initng/trunk/system/mountroot.i
glen
cvs at pld-linux.org
Sun Feb 26 12:15:35 CET 2006
Author: glen
Date: Sun Feb 26 12:15:32 2006
New Revision: 7021
Modified:
initng/trunk/system/mountroot.i
Log:
- updates from rc-scripts
Modified: initng/trunk/system/mountroot.i
==============================================================================
--- initng/trunk/system/mountroot.i (original)
+++ initng/trunk/system/mountroot.i Sun Feb 26 12:15:32 2006
@@ -10,11 +10,9 @@
# And sysconfig
if [ -r /etc/sysconfig/system ]; then
. /etc/sysconfig/system
- else
- VSERVER=no
fi
- if [ "$VSERVER" = "yes" ]; then
+ if is_yes "$VSERVER"; then
exit 0
fi
@@ -31,13 +29,18 @@
fi
if [ -f /forcefsck ]; then
- fsckoptions="-f $fsckoptions"
+ fsckoptions="-f $fsckoptions"
+ else
+ # Obey the fs_passno setting for / (see fstab(5))
+ # - find the / entry
+ # - make sure we have 6 fields
+ _ROOTFS_PASSNO=$(awk '($1 ~ /^(\/|UUID|LABEL)/ && $2 == "/" && NF == 6) { print $6}' /etc/fstab)
fi
_RUN_QUOTACHECK=0
_ROOTFS_TYPE=$(grep " / " /proc/mounts | awk '{ print $3 }')
- if [ -z "$fastboot" -a "$_ROOTFS_TYPE" != "nfs" -a "$_ROOTFS_TYPE" != "romfs" ]; then
+ if [ -z "$fastboot" -a "$_ROOTFS_TYPE" != "nfs" -a "$_ROOTFS_TYPE" != "romfs" -a "$_ROOTFS_PASSNO" != 0 ]; then
show "Checking root filesystem"; started
initlog -c "fsck -C -T -a $fsckoptions /"
@@ -86,7 +89,7 @@
# Unmount the initrd, if necessary
if LC_ALL=C grep -q /initrd /proc/mounts && ! LC_ALL=C grep -q /initrd/loopfs /proc/mounts ; then
if [ -e /initrd/dev/.devfsd ]; then
- umount /initrd/dev
+ umount /initrd/dev
fi
umount /initrd
/sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
@@ -141,12 +144,19 @@
[ -f /proc/bus/usb/devices ] && mount -f -t usbfs usbfs /proc/bus/usb
[ -e /dev/.devfsd ] && mount -f -t devfs devfs /dev
- if grep -q sysfs /proc/filesystems ; then
+ if grep -q sysfs /proc/mounts 2>/dev/null; then
mount -f -t sysfs sysfs /sys
+ if grep -q securityfs /proc/mounts 2>/dev/null ; then
+ mount -f -t securityfs securityfs /sys/kernel/security
+ fi
+ fi
+
+ if grep -q selinuxfs /proc/mounts 2>/dev/null; then
+ mount -f -t selinuxfs selinuxfs /selinux
fi
- if grep -q selinuxfs /proc/filesystems ; then
- mount -f -t selinuxfs selinuxfs /selinux
+ if grep -q cpuset /proc/mounts 2>/dev/null; then
+ mount -f -t cpuset none /dev/cpuset
fi
# FIXME: should be elsewhere
More information about the pld-cvs-commit
mailing list