Print this page
XXX Remove nawk(1)

*** 99,109 **** if (( $? != 0 )); then error "$e_badinfo" "net" return fi ! NETIF=$(echo $NET | /usr/bin/nawk '{ for (i = 1; i < NF; i++) { if ($i == "physical:") { if (length(net) == 0) { i++ net = $i --- 99,109 ---- if (( $? != 0 )); then error "$e_badinfo" "net" return fi ! NETIF=$(echo $NET | /usr/xpg4/bin/awk '{ for (i = 1; i < NF; i++) { if ($i == "physical:") { if (length(net) == 0) { i++ net = $i
*** 148,158 **** if [[ $? == 1 || -z "$tmpfile" ]]; then error "$e_tmpfile" return fi ! /usr/bin/nawk '{ if (substr($1, 0, 1) == "#") { print $0 } else { print "#", $0 modified=1 --- 148,158 ---- if [[ $? == 1 || -z "$tmpfile" ]]; then error "$e_tmpfile" return fi ! /usr/xpg4/bin/awk '{ if (substr($1, 0, 1) == "#") { print $0 } else { print "#", $0 modified=1
*** 196,206 **** if [[ $? == 1 || -z "$tmpfile" ]]; then error "$e_tmpfile" return fi ! /usr/bin/nawk '{ 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") { --- 196,206 ---- if [[ $? == 1 || -z "$tmpfile" ]]; then error "$e_tmpfile" return fi ! /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,269 **** && 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" && 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 \ --- 259,269 ---- && continue /usr/bin/egrep -s "SUNW_PKG_HOLLOW=true" \ $ZONEROOT/var/sadm/pkg/$pkg/pkginfo || continue ! 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,334 **** /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 [[ -n $LOGFILE ]] && \ printf "[$(date)] ${MSG_PREFIX}${v_svcsinzone}\n" >&2 [[ -n $LOGFILE ]] && cat $insttmpfile >&2 --- 324,334 ---- /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/xpg4/bin/awk '{print $3}' >>$insttmpfile [[ -n $LOGFILE ]] && \ printf "[$(date)] ${MSG_PREFIX}${v_svcsinzone}\n" >&2 [[ -n $LOGFILE ]] && cat $insttmpfile >&2
*** 454,464 **** if [[ -h $zoneconfig/index || ! -f $zoneconfig/index ]]; then error "$e_badfile" "/etc/zones/index" return fi ! NGZ=$(/usr/bin/nawk -F: '{ if (substr($1, 0, 1) == "#" || $1 == "global") continue if ($2 == "installed") printf("%s ", $1) --- 454,464 ---- if [[ -h $zoneconfig/index || ! -f $zoneconfig/index ]]; then error "$e_badfile" "/etc/zones/index" return fi ! NGZ=$(/usr/xpg4/bin/awk -F: '{ if (substr($1, 0, 1) == "#" || $1 == "global") continue if ($2 == "installed") printf("%s ", $1)
*** 467,477 **** # Return if there are no installed zones to warn about. [[ -z "$NGZ" ]] && return log "$v_rmzones" "$NGZ" ! NGZP=$(/usr/bin/nawk -F: '{ if (substr($1, 0, 1) == "#" || $1 == "global") continue if ($2 == "installed") printf("%s ", $3) --- 467,477 ---- # Return if there are no installed zones to warn about. [[ -z "$NGZ" ]] && return log "$v_rmzones" "$NGZ" ! NGZP=$(/usr/xpg4/bin/awk -F: '{ if (substr($1, 0, 1) == "#" || $1 == "global") continue if ($2 == "installed") printf("%s ", $3)
*** 580,590 **** # 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}') if (( $? != 0 )); then error "$e_badinfo" "stacktype" fi vlog "$v_stacktype" "$STACK_TYPE" --- 580,590 ---- # 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/xpg4/bin/awk -F: '{print $7}') if (( $? != 0 )); then error "$e_badinfo" "stacktype" fi vlog "$v_stacktype" "$STACK_TYPE"
*** 623,633 **** } 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 \ -v dirlist=$hollow_dir_list ' BEGIN { while (getline p <hollowpkgs > 0) pkgs[p] = 1; close(hollowpkgs); --- 623,633 ---- } 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/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);