Print this page
XXX Remove nawk(1)
*** 247,257 ****
#
# and it assumes the order of the fs properties as above.
#
get_fs_info()
{
! zonecfg -z $zonename info fs | nawk '{
if ($1 == "options:") {
# Remove brackets.
options=substr($2, 2, length($2) - 2);
printf("%s %s %s %s\n", dir, type, special, options);
} else if ($1 == "dir:") {
--- 247,257 ----
#
# and it assumes the order of the fs properties as above.
#
get_fs_info()
{
! zonecfg -z $zonename info fs | /usr/xpg4/bin/awk '{
if ($1 == "options:") {
# Remove brackets.
options=substr($2, 2, length($2) - 2);
printf("%s %s %s %s\n", dir, type, special, options);
} else if ($1 == "dir:") {
*** 272,282 ****
if [ ! -s $fstmpfile ]; then
return;
fi
# Sort the fs entries so we can handle nested mounts.
! sort $fstmpfile | nawk -v zonepath=$zonepath '{
if (NF == 4)
options="-o " $4;
else
options=""
--- 272,282 ----
if [ ! -s $fstmpfile ]; then
return;
fi
# Sort the fs entries so we can handle nested mounts.
! sort $fstmpfile | /usr/xpg4/bin/awk -v zonepath=$zonepath '{
if (NF == 4)
options="-o " $4;
else
options=""
*** 302,323 ****
if [ ! -s $fstmpfile ]; then
return;
fi
# Reverse sort the fs entries so we can handle nested unmounts.
! sort -r $fstmpfile | nawk -v zonepath=$zonepath '{
cmd="/usr/sbin/umount " zonepath "/root" $1
if (system(cmd) != 0) {
printf("command failed: %s\n", cmd);
}
}' >>$LOGFILE
}
# Find the dataset mounted on the zonepath.
get_zonepath_ds() {
ZONEPATH_DS=`/usr/sbin/zfs list -H -t filesystem -o name,mountpoint | \
! /usr/bin/nawk -v zonepath=$1 '{
if ($2 == zonepath)
print $1
}'`
if [ -z "$ZONEPATH_DS" ]; then
--- 302,323 ----
if [ ! -s $fstmpfile ]; then
return;
fi
# Reverse sort the fs entries so we can handle nested unmounts.
! sort -r $fstmpfile | /usr/xpg4/bin/awk -v zonepath=$zonepath '{
cmd="/usr/sbin/umount " zonepath "/root" $1
if (system(cmd) != 0) {
printf("command failed: %s\n", cmd);
}
}' >>$LOGFILE
}
# Find the dataset mounted on the zonepath.
get_zonepath_ds() {
ZONEPATH_DS=`/usr/sbin/zfs list -H -t filesystem -o name,mountpoint | \
! /usr/xpg4/bin/awk -v zonepath=$1 '{
if ($2 == zonepath)
print $1
}'`
if [ -z "$ZONEPATH_DS" ]; then
*** 567,577 ****
archive=$2
stage2=$3
vlog "$m_analyse_archive"
! base=`$stage1 $archive | $stage2 2>/dev/null | nawk -F/ '{
# Check for an absolute path archive
if (substr($0, 1, 1) == "/")
exit 1
if ($1 != ".")
--- 567,577 ----
archive=$2
stage2=$3
vlog "$m_analyse_archive"
! base=`$stage1 $archive | $stage2 2>/dev/null | /usr/xpg4/bin/awk -F/ '{
# Check for an absolute path archive
if (substr($0, 1, 1) == "/")
exit 1
if ($1 != ".")