From: Ben Gras Date: Wed, 18 Jan 2006 09:33:09 +0000 (+0000) Subject: . less verbose cd /usr debugging X-Git-Tag: v3.1.2a~434 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/syslog.conf.5.html?a=commitdiff_plain;h=093cfe1143233a0efd6fe9632411f96fbd27a626;p=minix.git . less verbose cd /usr debugging . save random data only if /usr is mounted rw, don't display error otherwise --- diff --git a/etc/rc b/etc/rc index ac72e4478..ade6493f1 100755 --- a/etc/rc +++ b/etc/rc @@ -90,7 +90,7 @@ start) usrdev="`expr $imagedev + 1`" usr_roflag="-r" usr="`/bin/dev2name $usrdev`" - echo "Setting /usr to mount readonly from cd: $usrdev -> $usr" + echo "Setting /usr on cd is $usr" fi # Mount the /usr partition unless this is a single floppy Minix. diff --git a/etc/usr/rc b/etc/usr/rc index ba4779f34..7c4cfdd39 100644 --- a/etc/usr/rc +++ b/etc/usr/rc @@ -154,15 +154,14 @@ start) ;; stop|down) - # Save random data. - bootcd="`/bin/sysenv bootcd`" - if dd if=/dev/random of=$RANDOM_FILE.new bs=1024 count=1 2>/dev/null - then + # Save random data, if /usr is mounted rw. + if grep ' \/usr .*rw' /etc/mtab >/dev/null + then + if dd if=/dev/random of=$RANDOM_FILE.new bs=1024 count=1 2>/dev/null + then mv $RANDOM_FILE.new $RANDOM_FILE - else - if [ "$bootcd" != 1 ] - then - echo 'Failed to save random data.' - fi + else + echo 'Failed to save random data.' + fi fi esac