summaryrefslogtreecommitdiffstats
path: root/src.etc/init.d/mounttmpfs
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-04 23:08:41 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-04 23:08:41 (EDT)
commit9de16d22b0ac3cbb74793faa913db889d8151ee5 (patch)
tree0f6ed6fe2701368c036c0da9e72be362963d68b6 /src.etc/init.d/mounttmpfs
parent79d474a5fdc0ea8b9e05f5b68567dbbe9086e4ca (diff)
parentb98d2d2ad1e341a6493fcd5531d605e8427665ca (diff)
Merge branch 'feature/init-system-improvements'.
Diffstat (limited to 'src.etc/init.d/mounttmpfs')
-rwxr-xr-xsrc.etc/init.d/mounttmpfs33
1 files changed, 6 insertions, 27 deletions
diff --git a/src.etc/init.d/mounttmpfs b/src.etc/init.d/mounttmpfs
index 96b398e..269ba74 100755
--- a/src.etc/init.d/mounttmpfs
+++ b/src.etc/init.d/mounttmpfs
@@ -1,47 +1,26 @@
-#!/bin/sh
+#!/bin/sh /etc/rc.common
start()
{
- printf 'Mounting temporary file systems... '
-
+ log 'Mounting temporary file systems'
if ! mount | grep -Fq ' /run '; then
- mount -t tmpfs -o nodev,noexec,nosuid,mode=0755 tmpfs /run
+ mount -t tmpfs -o nodev,noexec,nosuid,mode=0755 \
+ tmpfs /run
fi
-
[ -d /run/lock ] || mkdir -m 1777 /run/lock
[ -d /run/shm ] || mkdir -m 1777 /run/shm
-
if ! mount | grep -Fq ' /tmp '; then
mount -t tmpfs -o nodev,nosuid,mode=1777 tmpfs /tmp
fi
-
- printf 'done.\n'
}
stop()
{
- printf 'Unmounting temporary file systems... '
-
+ log 'Unmounting temporary file systems'
if mount | grep -Fq ' /run '; then
umount /run
fi
-
if mount | grep -Fq ' /tmp '; then
- umount /run
+ umount /tmp
fi
-
- printf 'done.\n'
}
-
-case "${1}" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- *)
- printf 'Usage: %s {start|stop}\n' "${0}" >&2
- exit 1
- ;;
-esac