diff options
author | P. J. McDermott <pjm@nac.net> | 2013-08-13 13:45:31 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-08-13 13:45:31 (EDT) |
commit | 3b5cacf7f24d8c1a294a49ba55e5ca968274e5cf (patch) | |
tree | c4b2ac9e70afc49680f63dc1cb89ce9fa3d42882 | |
parent | 09cb9e553cfb93965c756bf98f912bd5eb59aa65 (diff) |
/etc/init.d/mountdevsubfs: New script.
-rw-r--r-- | scripts | 21 | ||||
-rw-r--r-- | src.etc/init.d/mountdevsubfs | 39 |
2 files changed, 50 insertions, 10 deletions
@@ -1,10 +1,11 @@ -HOSTNAME hostname S03 -HTTPD httpd S40 K70 -KLOGD klogd S30 K80 -MDEV mdev S02 K98 -FEATURE_MOUNT_FSTAB mountall S10 -FEATURE_MOUNT_FLAGS mountkernfs S01 K99 -FEATURE_MOUNT_FLAGS mounttmpfs S03 K97 -IFUPDOWN networking S20 K90 -SYSLOGD syslog S30 K80 -TELNETD telnetd S40 K70 +HOSTNAME hostname S03 +HTTPD httpd S40 K70 +KLOGD klogd S30 K80 +MDEV mdev S02 K98 +FEATURE_MOUNT_FSTAB mountall S10 +FEATURE_MOUNT_FLAGS mountdevsubfs S03 K97 +FEATURE_MOUNT_FLAGS mountkernfs S01 K99 +FEATURE_MOUNT_FLAGS mounttmpfs S03 K97 +IFUPDOWN networking S20 K90 +SYSLOGD syslog S30 K80 +TELNETD telnetd S40 K70 diff --git a/src.etc/init.d/mountdevsubfs b/src.etc/init.d/mountdevsubfs new file mode 100644 index 0000000..14e82a3 --- /dev/null +++ b/src.etc/init.d/mountdevsubfs @@ -0,0 +1,39 @@ +#!/bin/sh + +start() +{ + printf 'Mounting device file systems... ' + + [ -d /dev/pts ] || mkdir -m 0755 /dev/pts + if ! mount | grep -F ' /dev/pts ' >dev/null 2>&1; then + mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts + fi + + ln -sf /run/shm /dev/shm + + printf 'done.\n' +} + +stop() +{ + printf 'Unmounting device file systems... ' + + if mount | grep -F ' /dev/pts ' >dev/null 2>&1; then + umount /dev/pts + fi + + printf 'done.\n' +} + +case "${1}" in + start) + start + ;; + stop) + stop + ;; + *) + printf 'Usage: %s {start|stop}\n' "${0}" >&2 + exit 1 + ;; +esac |