. less verbose cd /usr debugging
. save random data only if /usr is mounted rw, don't display error otherwise
This commit is contained in:
parent
428f9d63c4
commit
093cfe1143
2 changed files with 9 additions and 10 deletions
2
etc/rc
2
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.
|
||||
|
|
17
etc/usr/rc
17
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
|
||||
|
|
Loading…
Reference in a new issue