Print this page
XXX Remove nawk(1)
*** 44,54 ****
is_zfs_boot=no
check_pcfs_boot()
{
bootdev=`grep -v "^#" "$ALT_ROOT"/etc/vfstab | grep pcfs \
! | grep "[ ]/stubboot[ ]" | nawk '{print $1}'`
if [ X"$bootdev" = "X" ]; then
is_pcfs_boot=no
fi
}
--- 44,54 ----
is_zfs_boot=no
check_pcfs_boot()
{
bootdev=`grep -v "^#" "$ALT_ROOT"/etc/vfstab | grep pcfs \
! | grep "[ ]/stubboot[ ]" | /usr/xpg4/bin/awk '{print $1}'`
if [ X"$bootdev" = "X" ]; then
is_pcfs_boot=no
fi
}
*** 89,105 ****
rootdevlist=`LC_ALL=C zpool iostat -v "$rootpool" | tail +5 |
egrep -v "mirror|spare|replacing" |
sed -n -e '/--/q' -e p | awk '{print $1}'`
else
metadev=`grep -v "^#" "$ALT_ROOT"/etc/vfstab | \
! grep "[ ]/[ ]" | nawk '{print $2}'`
if [[ $metadev = /dev/rdsk/* ]]; then
rootdevlist=`basename "$metadev"`
elif [[ $metadev = /dev/md/rdsk/* ]]; then
metavol=`basename "$metadev"`
rootdevlist=`metastat -p $metavol |\
! grep -v "^$metavol[ ]" | nawk '{print $4}'`
fi
fi
for rootdev in $rootdevlist
do
echo /dev/rdsk/`basename $rootdev`
--- 89,105 ----
rootdevlist=`LC_ALL=C zpool iostat -v "$rootpool" | tail +5 |
egrep -v "mirror|spare|replacing" |
sed -n -e '/--/q' -e p | awk '{print $1}'`
else
metadev=`grep -v "^#" "$ALT_ROOT"/etc/vfstab | \
! grep "[ ]/[ ]" | /usr/xpg4/bin/awk '{print $2}'`
if [[ $metadev = /dev/rdsk/* ]]; then
rootdevlist=`basename "$metadev"`
elif [[ $metadev = /dev/md/rdsk/* ]]; then
metavol=`basename "$metadev"`
rootdevlist=`metastat -p $metavol |\
! grep -v "^$metavol[ ]" | /usr/xpg4/bin/awk '{print $4}'`
fi
fi
for rootdev in $rootdevlist
do
echo /dev/rdsk/`basename $rootdev`
*** 120,130 ****
# Note: /stubboot/boot/grub/stage2 must stay untouched.
#
mkdir -p "$ALT_ROOT"/stubboot/boot/grub
cp "$ALT_ROOT"/boot/grub/menu.lst "$ALT_ROOT"/stubboot/boot/grub
bootdev=`grep -v "^#" "$ALT_ROOT"/etc/vfstab | grep pcfs | \
! grep "[ ]/stubboot[ ]" | nawk '{print $1}'`
rpcfsdev=`echo "$bootdev" | sed -e "s/dev\/dsk/dev\/rdsk/"`
if [ X"$rpcfsdev" != X ]; then
print "Installing grub on $rpcfsdev"
"$ALT_ROOT"/sbin/installgrub $STAGE1 $STAGE2 $rpcfsdev
fi
--- 120,130 ----
# Note: /stubboot/boot/grub/stage2 must stay untouched.
#
mkdir -p "$ALT_ROOT"/stubboot/boot/grub
cp "$ALT_ROOT"/boot/grub/menu.lst "$ALT_ROOT"/stubboot/boot/grub
bootdev=`grep -v "^#" "$ALT_ROOT"/etc/vfstab | grep pcfs | \
! grep "[ ]/stubboot[ ]" | /usr/xpg4/bin/awk '{print $1}'`
rpcfsdev=`echo "$bootdev" | sed -e "s/dev\/dsk/dev\/rdsk/"`
if [ X"$rpcfsdev" != X ]; then
print "Installing grub on $rpcfsdev"
"$ALT_ROOT"/sbin/installgrub $STAGE1 $STAGE2 $rpcfsdev
fi