mainstream-format fstab format
. detect both formats in /etc/rc . generate new format in setup . obsoletes /etc/fstab.local: everything can go in /etc/fstab . put shutdown/reboot/halt and a copy of /usr/adm/wtmp (/etc/wtmp) on root FS so that we can do shutdown checks before mounting /usr . new fstab format makes getfsent() and friends work
This commit is contained in:
@@ -17,13 +17,18 @@ case "$#:$1" in
|
||||
esac
|
||||
|
||||
# Get the device table.
|
||||
. /etc/fstab
|
||||
FSTAB=/etc/fstab
|
||||
touch $FSTAB
|
||||
if grep -q "Poor man" $FSTAB
|
||||
then . $FSTAB
|
||||
else root="`awk <$FSTAB '{ if($2=="/") { print $1 } }'`"
|
||||
fi
|
||||
|
||||
# The real root device may be the RAM disk.
|
||||
realroot=`printroot -r`
|
||||
|
||||
# If it's an initial fstab, pretend root is real root
|
||||
if [ $root = "/dev/ROOT" ]
|
||||
if [ "$root" = "/dev/ROOT" -o -z "$root" ]
|
||||
then root=$realroot
|
||||
fi
|
||||
|
||||
|
||||
@@ -308,19 +308,22 @@ extrakb=`du -s $RELEASEDIR/usr/install | awk '{ print $1 }'`
|
||||
find $RELEASEDIR/usr | fgrep -v /install/ | wc -l >$RELEASEDIR/.usrfiles
|
||||
find $RELEASEDIR -print -path $RELEASEDIR/usr -prune | wc -l >$RELEASEDIR/.rootfiles
|
||||
|
||||
fstab_marker="# Poor man's File System Table."
|
||||
echo " * Writing fstab"
|
||||
if [ "$USB" -ne 0 ]
|
||||
then
|
||||
echo \
|
||||
'root=/dev/c0d7p0s0
|
||||
"$fstab_marker
|
||||
root=/dev/c0d7p0s0
|
||||
usr=/dev/c0d7p0s2
|
||||
' > $RELEASEDIR/etc/fstab
|
||||
" > $RELEASEDIR/etc/fstab
|
||||
elif [ "$HDEMU" -ne 0 ]
|
||||
then
|
||||
echo \
|
||||
'root=/dev/c0d7p0s0
|
||||
"$fstab_marker
|
||||
root=/dev/c0d7p0s0
|
||||
usr=/dev/c0d7p0s2
|
||||
usr_roflag="-r"' > $RELEASEDIR/etc/fstab
|
||||
usr_roflag=\"-r\"" > $RELEASEDIR/etc/fstab
|
||||
fi
|
||||
|
||||
echo " * Mounting $TMPDISKROOT as $RELEASEMNTDIR"
|
||||
|
||||
Reference in New Issue
Block a user