introduce the fsckopts sysenv, options passed to fsck by /etc/rc.

setting 'fsckopts=-a' makes it much easier to work on a minix machine
remotely and reboot after a crash.
This commit is contained in:
Ben Gras 2010-03-31 15:06:53 +00:00
parent de93803ab0
commit 9fd4c2a20d

12
etc/rc
View file

@ -51,6 +51,12 @@ start)
# National keyboard?
test -f /etc/keymap && loadkeys /etc/keymap
# options for fsck. default is -r, which prompts the user for repairs.
fsckopts="`sysenv fsckopts`"
if [ ! "$fsckopts" ]
then fsckopts=-r
fi
if [ "`sysenv debug_fkeys`" != 0 ]
then
up is -period 5HZ
@ -133,12 +139,12 @@ Mount $usr /usr failed -- Single user."
then
umount $usr
echo "fsck / - $root"
intr fsck -r $root
intr fsck $fsckopts $root
echo "fsck /usr - $usr"
intr fsck -r $usr
intr fsck $fsckopts $usr
if [ ! -z "$home" ]
then echo "fsck /home - $home"
intr fsck -r $home
intr fsck $fsckopts $home
fi
mount $bin_img $usr /usr
fi