[Pkg-sysvinit-commits] r363 - in sysvinit/trunk/debian: .
initscripts/etc/init.d
Thomas Hood
jdthood-guest at costa.debian.org
Tue Dec 13 20:51:23 UTC 2005
Author: jdthood-guest
Date: 2005-12-13 20:51:21 +0000 (Tue, 13 Dec 2005)
New Revision: 363
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs
Log:
Mount /run too
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2005-12-13 20:10:30 UTC (rev 362)
+++ sysvinit/trunk/debian/changelog 2005-12-13 20:51:21 UTC (rev 363)
@@ -22,6 +22,7 @@
Thanks to Theodore Y. Ts'o.
* checkroot.sh, mountvirtfs: Eliminate use of dir_writable in order to
try to please selinux (Closes: #333836)
+ * mountvirtfs: Mount a tmpfs on /run if specified in /etc/fstab
* checkroot.sh: Only run findfs for mount on / (Closes: #275680)
Thanks to Cameron Hutchison for the patch.
* mountall.sh, mountnfs.sh: Split call to bootclean out into separate
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs 2005-12-13 20:10:30 UTC (rev 362)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs 2005-12-13 20:51:21 UTC (rev 363)
@@ -105,7 +105,7 @@
exec 0<&9 9<&-
fi
- if [ ! -d $3 ]
+ if [ ! -d "$3" ]
then
log_warning_msg "Mount point '$3' does not exist. Skipping mount."
return
@@ -151,13 +151,21 @@
restorecon /etc/mtab
fi
+ #
+ # Mount /proc
+ #
domount proc "" /proc
+
+ #
+ # Mount /sys
+ #
# Only mount sysfs if it is supported (kernel >= 2.6)
if grep -E -qs "sysfs\$" /proc/filesystems
then
- domount sysfs "" /sys
+ domount sysfs "" /sys
fi
+ #
# Mount /dev/pts. Create master ptmx node if needed.
#
# As of 2.5.68, devpts is not automounted when using devfs. So we
@@ -194,20 +202,20 @@
fi
fi
- # Mount tmpfs on /dev/shm
+ # Regarding tmpfs:
#
# Around kernel version 2.3.3x, a memory based filesystem was
- # introduced to support POSIX shared memory, called shmfs.
- # Later this filesystem was extended for general usage -
- # provided you set the CONFIG_TMPFS compile option and mount
- # it as type tmpfs.
+ # introduced to support POSIX shared memory, called 'shmfs'.
+ # Later this filesystem was extended for general usage and a
+ # "tmpfs" could be mounted. The CONFIG_TMPFS kernel compile option
+ # must be set to 'y', as it is for Debian kernels.
#
# Early in the 2.4 kernel series, shmfs was renamed to tmpfs, but
- # you could mount it using both type shmfs and tmpfs. Starting
- # at kernel version 2.5.44, the shmfs alias was dropped.
+ # could be mounted using either 'shmfs' or 'tmpfs'. Starting with
+ # kernel version 2.5.44, the 'shmfs' alias was dropped.
#
- # Confusingly, in kernels 2.3.x - 2.5.43 where both shmfs and
- # tmpfs are present, disabling CONFIG_TMPFS actually removes
+ # Confusingly, in kernels 2.3.x - 2.5.43 where both "shmfs" and
+ # "tmpfs" are present, disabling CONFIG_TMPFS actually removes
# support for shmfs, but tmpfs is still listed in /proc/filesystems
# to support SYSV and POSIX shared memory, and it should still be
# mounted under /dev/shm.
@@ -218,13 +226,26 @@
# Tmpfs can be used as memory filesystem, so you can limit tmpfs
# max size using /etc/default/tmpfs to prevent tmpfs from using
# up all system memory.
+
#
+ # Mount /run
+ #
+ if [ "$RUNFS_SIZE" ]
+ then
+ RUNFS_OPT="-osize=${RUNFS_SIZE}"
+ fi
+ domount tmpfs "" /run $RUNFS_OPT
+
+ #
+ # Mount /dev/shm
+ #
if [ "$TMPFS_SIZE" ]
then
TMPFS_OPT="-osize=${TMPFS_SIZE}"
fi
domount tmpfs shmfs /dev/shm $TMPFS_OPT
+ #
# Mount usbfs/usbdevfs if /proc/bus/usb is present.
#
# Usbfs/usbdevfs is used for USB related binaries/libraries.
More information about the Pkg-sysvinit-commits
mailing list