Print this page
XXX Remove nawk(1)
@@ -99,11 +99,11 @@
if (( $? != 0 )); then
error "$e_badinfo" "net"
return
fi
- NETIF=$(echo $NET | /usr/bin/nawk '{
+ NETIF=$(echo $NET | /usr/xpg4/bin/awk '{
for (i = 1; i < NF; i++) {
if ($i == "physical:") {
if (length(net) == 0) {
i++
net = $i
@@ -148,11 +148,11 @@
if [[ $? == 1 || -z "$tmpfile" ]]; then
error "$e_tmpfile"
return
fi
- /usr/bin/nawk '{
+ /usr/xpg4/bin/awk '{
if (substr($1, 0, 1) == "#") {
print $0
} else {
print "#", $0
modified=1
@@ -196,11 +196,11 @@
if [[ $? == 1 || -z "$tmpfile" ]]; then
error "$e_tmpfile"
return
fi
- /usr/bin/nawk '{
+ /usr/xpg4/bin/awk '{
if (substr($1, 0, 1) == "#") {
print $0
} else if ($1 == "fd" || $1 == "/proc" || $1 == "swap" ||
$1 == "ctfs" || $1 == "objfs" || $1 == "sharefs" ||
$4 == "nfs" || $4 == "lofs") {
@@ -259,11 +259,11 @@
&& continue
/usr/bin/egrep -s "SUNW_PKG_HOLLOW=true" \
$ZONEROOT/var/sadm/pkg/$pkg/pkginfo || continue
- for j in $(/usr/bin/nawk '{if ($2 == "f" &&
+ for j in $(/usr/xpg4/bin/awk '{if ($2 == "f" &&
substr($4, 1, 17) == "var/svc/manifest/") print $4}' \
$ZONEROOT/var/sadm/pkg/$pkg/save/pspool/$pkg/pkgmap)
do
svcs=$(SVCCFG_NOVALIDATE=1 \
SVCCFG_REPOSITORY=$ZONEROOT/etc/svc/repository.db \
@@ -324,11 +324,11 @@
/usr/bin/rm -f $SMFTMPFILE
# Get a list of the svcs that now exist in the zone.
LANG=C /usr/sbin/zlogin -S $ZONENAME /usr/bin/svcs -aH | \
- /usr/bin/nawk '{print $3}' >>$insttmpfile
+ /usr/xpg4/bin/awk '{print $3}' >>$insttmpfile
[[ -n $LOGFILE ]] && \
printf "[$(date)] ${MSG_PREFIX}${v_svcsinzone}\n" >&2
[[ -n $LOGFILE ]] && cat $insttmpfile >&2
@@ -454,11 +454,11 @@
if [[ -h $zoneconfig/index || ! -f $zoneconfig/index ]]; then
error "$e_badfile" "/etc/zones/index"
return
fi
- NGZ=$(/usr/bin/nawk -F: '{
+ NGZ=$(/usr/xpg4/bin/awk -F: '{
if (substr($1, 0, 1) == "#" || $1 == "global")
continue
if ($2 == "installed")
printf("%s ", $1)
@@ -467,11 +467,11 @@
# Return if there are no installed zones to warn about.
[[ -z "$NGZ" ]] && return
log "$v_rmzones" "$NGZ"
- NGZP=$(/usr/bin/nawk -F: '{
+ NGZP=$(/usr/xpg4/bin/awk -F: '{
if (substr($1, 0, 1) == "#" || $1 == "global")
continue
if ($2 == "installed")
printf("%s ", $3)
@@ -580,11 +580,11 @@
# be fixed up manually afterwards and it may need some additional manual
# cleanup in any case.
#
STACK_TYPE=$(/usr/sbin/zoneadm -z $ZONENAME list -p | \
- /usr/bin/nawk -F: '{print $7}')
+ /usr/xpg4/bin/awk -F: '{print $7}')
if (( $? != 0 )); then
error "$e_badinfo" "stacktype"
fi
vlog "$v_stacktype" "$STACK_TYPE"
@@ -623,11 +623,11 @@
}
for pkg_name in $ZONEROOT/var/sadm/pkg/*; do
grep 'SUNW_PKG_HOLLOW=true' $pkg_name/pkginfo >/dev/null 2>&1 && \
basename $pkg_name >>$hollow_pkgs
done
-/usr/bin/nawk -v hollowpkgs=$hollow_pkgs -v filelist=$hollow_file_list \
+/usr/xpg4/bin/awk -v hollowpkgs=$hollow_pkgs -v filelist=$hollow_file_list \
-v dirlist=$hollow_dir_list '
BEGIN {
while (getline p <hollowpkgs > 0)
pkgs[p] = 1;
close(hollowpkgs);