Print this page
XXX Remove nawk(1)
@@ -19,12 +19,10 @@
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# SVM Flash cleanup
# Remove existing master SVM configuration on clone after full flash install.
@@ -44,11 +42,11 @@
if [ "${FLASH_TYPE}" = "FULL" ]; then
# Full flash install, remove master's SVM configuration from clone.
# Remove any SVM root entry from /etc/system file.
- nawk '
+ /usr/xpg4/bin/awk '
BEGIN {delroot=0}
/^\* Begin MDD root info \(do not edit\)$/ {delroot=1}
/^\* End MDD root info \(do not edit\)$/ {delroot=0; next}
{if (delroot == 0) print $0}
' ${IN_SYS} > ${TMP_SYS}
@@ -64,20 +62,20 @@
# need to copy the md.conf file from the current root onto the
# newly installed root. Note that the flash archive might not have
# been created from the currently running system.
if [ -h /kernel/drv/md.conf ]; then
# Remove SVM mddb entries from /kernel/drv/md.conf.
- nawk '
+ /usr/xpg4/bin/awk '
BEGIN {delmddb=0}
/^# Begin MDD database info \(do not edit\)$/ {delmddb=1}
/^# End MDD database info \(do not edit\)$/ {delmddb=0; next}
{if (delmddb == 0) print $0}
' ${IN_CONF} > ${TMP_CONF}
cp ${TMP_CONF} ${IN_CONF}
# Remove SVM mddb entries from /etc/lvm/mddb.cf.
- nawk '
+ /usr/xpg4/bin/awk '
/^#/ {print $0}
' ${IN_CF} > ${TMP_CF}
cp ${TMP_CF} ${IN_CF}
else
@@ -144,19 +142,19 @@
# There is no difference so leave it alone.
exit 0;
fi
# Get any SVM root entry from master /etc/system file.
- MASTER_ROOT=`nawk '
+ MASTER_ROOT=`/usr/xpg4/bin/awk '
BEGIN {inroot=0}
/^\* Begin MDD root info \(do not edit\)$/ {inroot=1; next}
/^\* End MDD root info \(do not edit\)$/ {inroot=0}
{if (inroot == 1) print $0}
' ${IN_SYS}`
# Get any SVM root entry from clone /etc/system file.
- CLONE_ROOT=`nawk '
+ CLONE_ROOT=`/usr/xpg4/bin/awk '
BEGIN {inroot=0}
/^\* Begin MDD root info \(do not edit\)$/ {inroot=1; next}
/^\* End MDD root info \(do not edit\)$/ {inroot=0}
{if (inroot == 1) print $0}
' ${SAVE_DIR}/system`
@@ -166,11 +164,11 @@
# If there is an SVM root entry in the clone /etc/system file.
if [ "${CLONE_ROOT}" ]; then
# Restore clone SVM root entry in /etc/system file.
- nawk -v clone_root="${CLONE_ROOT}" '
+ /usr/xpg4/bin/awk -v clone_root="${CLONE_ROOT}" '
BEGIN {newroot=0}
/^\* Begin MDD root info \(do not edit\)$/ {
newroot=1
print $0
print clone_root
@@ -182,11 +180,11 @@
else
# There is no SVM root entry in the clone so remove the entry
# from the /etc/system file.
- nawk '
+ /usr/xpg4/bin/awk '
BEGIN {delroot=0}
/^\* Begin MDD root info \(do not edit\)$/ {delroot=1}
/^\* End MDD root info \(do not edit\)$/ {delroot=0; next }
{if (delroot == 0) print $0}
' ${IN_SYS} >${TMP_SYS}