From: Ben Gras Date: Wed, 31 Mar 2010 15:06:53 +0000 (+0000) Subject: introduce the fsckopts sysenv, options passed to fsck by /etc/rc. X-Git-Tag: v3.1.7~185 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/rndc.conf.html?a=commitdiff_plain;h=9fd4c2a20d7a77a92881b06dc85baca0b72eebf2;p=minix.git 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. --- diff --git a/etc/rc b/etc/rc index 08c0b4c4b..78ee4ed65 100755 --- a/etc/rc +++ b/etc/rc @@ -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