Fix positional parameter reference to ${10}.

Fix target location for generation of fstab.

PR:	bin/70795
This commit is contained in:
Thomas Quinot 2004-08-21 20:21:49 +00:00
parent 60673f3572
commit 66189a39ec

View File

@ -25,14 +25,14 @@ ALTROOTSLICE=$6
CFGSLICE=$7 CFGSLICE=$7
WD=$8 WD=$8
IMG=$9 IMG=$9
CFGMASTER=$10 CFGMASTER=${10}
TMPFILE0=`mktemp -t nanobsd` TMPFILE0=`mktemp -t nanobsd`
TMPFILE1=`mktemp -t nanobsd` TMPFILE1=`mktemp -t nanobsd`
TMPMNT=`mktemp -d -t nanobsd` TMPMNT=`mktemp -d -t nanobsd`
make_fstab () { make_fstab () {
echo "/dev/$1 / ufs ro 1 1" > ${WD}/etc/fstab echo "/dev/$1 / ufs ro 1 1" > $2/etc/fstab
} }
get_label () { get_label () {
@ -75,7 +75,7 @@ bsdlabel -w -B ${MD}s1
newfs ${PRIROOTLABEL} -O1 -U ${MD}s1a newfs ${PRIROOTLABEL} -O1 -U ${MD}s1a
mount /dev/${MD}s1a ${TMPMNT} mount /dev/${MD}s1a ${TMPMNT}
(cd ${WD} && find . -print | cpio -dump ${TMPMNT}) || true (cd ${WD} && find . -print | cpio -dump ${TMPMNT}) || true
make_fstab ${PRIROOTSLICE} make_fstab ${PRIROOTSLICE} ${TMPMNT}
df ${TMPMNT} df ${TMPMNT}
umount ${TMPMNT} umount ${TMPMNT}
@ -86,7 +86,7 @@ if [ -n "${ALTROOTLABEL}" ]; then
tunefs ${ALTROOTLABEL} /dev/${MD}s2a tunefs ${ALTROOTLABEL} /dev/${MD}s2a
fi fi
mount /dev/${MD}s2a ${TMPMNT} mount /dev/${MD}s2a ${TMPMNT}
make_fstab ${ALTROOTSLICE} make_fstab ${ALTROOTSLICE} ${TMPMNT}
umount ${TMPMNT} umount ${TMPMNT}
# Prepare configuration slice # Prepare configuration slice