diff options
author | isamu <none@none> | 2007-04-19 15:01:50 -0700 |
---|---|---|
committer | isamu <none@none> | 2007-04-19 15:01:50 -0700 |
commit | 5e4a8f306017d970f426ffb60ef1da095ec19768 (patch) | |
tree | 656b534d7760a5bbf5cd996652f77451638862cf /usr/src | |
parent | 5e1e04ce077ee9badc488dc9562a228f2609823c (diff) | |
download | illumos-gate-5e4a8f306017d970f426ffb60ef1da095ec19768.tar.gz |
6538844 putback of pkg level scripts for 6219146 breaks pkg/patch delivery
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/pkgdefs/SUNWcsr/preinstall | 4 | ||||
-rwxr-xr-x | usr/src/pkgdefs/common_files/i.hosts | 39 |
2 files changed, 26 insertions, 17 deletions
diff --git a/usr/src/pkgdefs/SUNWcsr/preinstall b/usr/src/pkgdefs/SUNWcsr/preinstall index 39490227d8..fb4bb5223b 100644 --- a/usr/src/pkgdefs/SUNWcsr/preinstall +++ b/usr/src/pkgdefs/SUNWcsr/preinstall @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" @@ -31,7 +31,7 @@ # if [ ! -h $BASEDIR/etc/inet/ipnodes ]; then if [ -f $BASEDIR/etc/inet/ipnodes ]; then - mv -f $BASEDIR/etc/inet/ipnodes \ + cp -f $BASEDIR/etc/inet/ipnodes \ $BASEDIR/etc/inet/ipnodes.hostsmerge fi fi diff --git a/usr/src/pkgdefs/common_files/i.hosts b/usr/src/pkgdefs/common_files/i.hosts index 18ddb67ee4..14697282ba 100755 --- a/usr/src/pkgdefs/common_files/i.hosts +++ b/usr/src/pkgdefs/common_files/i.hosts @@ -20,7 +20,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -414,19 +414,16 @@ merge_ipnodes() { } -# main -exit_status=0 -saved_ipnodes_file=$BASEDIR/etc/inet/ipnodes.hostsmerge -temp_ipnodes_file=/tmp/ipnodes.hostsmerge -temp_merged_file=/tmp/hosts.hostsmerged - -# Unlike regular class action scripts do not process -# all files assigned to the class. Merge should -# only happen for the /etc/inet/hosts file, hence -# read the src and dest arguments just once. - -if read src dest; then - +# +# deliver_hosts: This function merges /etc/inet/hosts and /etc/inet/ipnodes +# into a single hosts file (/etc/inet/hosts) only when ipnodes file exists in +# the system. /etc/inet/ipnodes is now a symlink to /etc/inet/hosts. +# +deliver_hosts() { + saved_ipnodes_file=$BASEDIR/etc/inet/ipnodes.hostsmerge + temp_ipnodes_file=/tmp/ipnodes.hostsmerge + temp_merged_file=/tmp/hosts.hostsmerged + # if /etc/inet/hosts doesn't exist (fresh install) # then same action as 'i.preserve' i.e # copy default /etc/inet/hosts in place. @@ -471,7 +468,19 @@ if read src dest; then continue fi fi -fi +} + +# main +exit_status=0 + +while read src dest; do + dest_name=`basename "$dest"` + + case "${dest_name}" in + "hosts") deliver_hosts ;; + *) ;; + esac +done exit $exit_status |