]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/initscripts/system/mounttmpfs
Move all initscripts for the system to src/initscripts/system
[ipfire-2.x.git] / src / initscripts / system / mounttmpfs
diff --git a/src/initscripts/system/mounttmpfs b/src/initscripts/system/mounttmpfs
new file mode 100644 (file)
index 0000000..9ec8c3a
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/mounttmpfs
+#
+# Description : Mount tmpfses
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+       start)
+               boot_mesg -n "Mounting ramdisk file systems:" ${INFO}
+
+               if ! mountpoint /var/lock &>/dev/null; then
+                       boot_mesg -n " /var/lock" ${NORMAL}
+                       mount -n -t tmpfs -o nosuid,nodev,size=8M /var/lock /var/lock || failed=1
+               fi
+
+               boot_mesg "" ${NORMAL}
+
+               (exit ${failed})
+               evaluate_retval
+               ;;
+
+       *)
+               echo "Usage: ${0} {start}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/mounttmpfs