X-Git-Url: http://gitweb/?a=blobdiff_plain;f=rc%2Frc;h=4fc61d275dcf2a767795726d6ee7541acbfbfb46;hb=8499ab6ed87ca1e1e13747105866027360509f65;hp=f26e95f3ddf0b955572cfcff35a03ab9f4907b7f;hpb=6dca1d213a39ee6af51632926e8b7c8914215cd9;p=crossrootfs.git diff --git a/rc/rc b/rc/rc old mode 100755 new mode 100644 index f26e95f..4fc61d2 --- a/rc/rc +++ b/rc/rc @@ -3,21 +3,36 @@ # /etc/rc: system boot script # -echo "The system is coming up. Please wait." +echo "The system is coming up. Please wait." # Load configuration . /etc/rc.conf # Start udev -/bin/mount -n -t proc none /proc -/bin/mount -n -t sysfs none /sys +/bin/mount -t proc none /proc +/bin/mount -t sysfs none /sys /sbin/start_udev +# Create device-mapper device nodes and scan for LVM volume groups +if [ -x /sbin/lvm ]; then + /sbin/vgscan --mknodes --ignorelockingfailure + /sbin/vgchange --ignorelockingfailure -a y +fi + +# Scan for btrfs volumes to simplify fstab entries +if [ -r /sys/fs/btrfs ]; then + /sbin/btrfs dev scan +fi + # Mount root read-only -/bin/mount -n -o remount,ro / +/bin/mount -o remount,ro / + +if [ -f /forcefsck ]; then +FORCEFSCK="-f" +fi # Check filesystems -/sbin/fsck -A -T -C -a +/sbin/fsck $FORCEFSCK -A -T -C -a if [ $? -gt 1 ]; then echo echo "*************** FILESYSTEM CHECK FAILED ******************" @@ -33,16 +48,12 @@ if [ $? -gt 1 ]; then /sbin/sulogin -p echo "Automatic reboot in progress..." /bin/umount -a -r - /bin/mount -n -o remount,ro / + /bin/mount -o remount,ro / /sbin/reboot -f exit 0 fi # Mount local filesystems -/bin/mount -n -o remount,rw / -/bin/umount /sys /proc -/bin/rm -f /etc/mtab* -/bin/touch /etc/mtab /bin/mount -o remount,rw / /bin/mount -a -O no_netdev @@ -51,8 +62,7 @@ fi # Clean up misc files : > /var/run/utmp -/bin/rm -rf /forcefsck /fastboot /halt /poweroff -/bin/rm -rf /etc/nologin /etc/shutdownpid +/bin/rm -rf /forcefsck /fastboot /etc/nologin /etc/shutdownpid (cd /var/run && /usr/bin/find . -name "*.pid" -delete) (cd /var/lock && /usr/bin/find . ! -type d -delete) (cd /tmp && /usr/bin/find . ! -name . -delete) @@ -77,7 +87,7 @@ fi if [ "$TIMEZONE" ]; then /bin/ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime fi -#/sbin/hwclock --hctosys +/sbin/hwclock --hctosys # Load console font if [ "$FONT" ]; then @@ -88,11 +98,11 @@ fi # Load console keymap if [ "$KEYMAP" ]; then echo "keyboard: $KEYMAP" - /bin/loadkeys -q $KEYMAP + /usr/bin/loadkeys -q $KEYMAP fi -# Screen blanks after 5 minutes idle time -/usr/bin/setterm -blank 5 +# Screen blanks after 15 minutes idle time +/usr/bin/setterm -blank 15 # Run module initialization script if [ -x /etc/rc.modules ]; then