summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/pkgdefs/SUNWlsimega/postinstall14
-rw-r--r--usr/src/pkgdefs/SUNWlsimega/postremove16
2 files changed, 26 insertions, 4 deletions
diff --git a/usr/src/pkgdefs/SUNWlsimega/postinstall b/usr/src/pkgdefs/SUNWlsimega/postinstall
index c9b1c7fe95..70f0ddb037 100644
--- a/usr/src/pkgdefs/SUNWlsimega/postinstall
+++ b/usr/src/pkgdefs/SUNWlsimega/postinstall
@@ -125,6 +125,9 @@ addlsimegatargets()
CP=/usr/bin/cp
MV=/usr/bin/mv
RM=/usr/bin/rm
+ CHMOD=/usr/bin/chmod
+ CHOWN=/usr/bin/chown
+ CHGRP=/usr/bin/chgrp
target=0
# check if $SDCONF exists
@@ -134,6 +137,12 @@ addlsimegatargets()
exit 1
fi
+ # Force correct attributes of $SDCONF to allow successful
+ # interim build upgrade
+ $CHMOD 644 $SDCONF
+ $CHOWN root $SDCONF
+ $CHGRP sys $SDCONF
+
$GREP -w "$HEADER" $SDCONF >/dev/null 2>&1
slstatus=$?
$GREP -w "$FOOTER" $SDCONF >/dev/null 2>&1
@@ -153,7 +162,8 @@ addlsimegatargets()
| $GREP -v "$HEADER3" >> /tmp/$$.conf
if [ $? -eq 0 ]
then
- $MV /tmp/$$.conf $SDCONF
+ $CP /tmp/$$.conf $SDCONF
+ $RM -f /tmp/$$.conf >/dev/null 2>&1
else
$RM -f /tmp/$$.conf >/dev/null 2>&1
echo "ERROR while cleaning up lsimega related info in $SDCONF file"
@@ -190,7 +200,7 @@ addlsimegatargets()
# Copy the $SDCONF into /tmp as a backup
$RM -f /tmp/sd.conf.$$ >/dev/null 2>&1
- $CP $SDCONF /tmp/sd.conf.$$ >/dev/null 2>&1
+ $CP -p $SDCONF /tmp/sd.conf.$$ >/dev/null 2>&1
# Now put all the lines into SDCONF file
# in one shot
diff --git a/usr/src/pkgdefs/SUNWlsimega/postremove b/usr/src/pkgdefs/SUNWlsimega/postremove
index 6ff4aed8a7..019aa8192e 100644
--- a/usr/src/pkgdefs/SUNWlsimega/postremove
+++ b/usr/src/pkgdefs/SUNWlsimega/postremove
@@ -23,6 +23,10 @@ deletelsimegatargets()
NAWK=/usr/bin/nawk
RM=/usr/bin/rm
MV=/usr/bin/mv
+ CP=/usr/bin/cp
+ CHMOD=/usr/bin/chmod
+ CHOWN=/usr/bin/chown
+ CHGRP=/usr/bin/chgrp
# Check if $SDCONF file exists
if [ ! -f $SDCONF ]
@@ -31,6 +35,12 @@ deletelsimegatargets()
exit 1
fi
+ # Force correct attributes of $SDCONF to allow successful
+ # interim build upgrade
+ $CHMOD 644 $SDCONF
+ $CHOWN root $SDCONF
+ $CHGRP sys $SDCONF
+
$RM /tmp/$$.conf >/dev/null 2>&1
$GREP -w "$HEADER" $SDCONF >/dev/null 2>&1
@@ -62,7 +72,8 @@ deletelsimegatargets()
| $GREP -v "$HEADER3" >> /tmp/$$.conf
if [ $? -eq 0 ]
then
- $MV /tmp/$$.conf $SDCONF
+ $CP /tmp/$$.conf $SDCONF
+ $RM -f /tmp/$$.conf >/dev/null 2>&1
else
echo "ERROR while removing lsimega related lines from $SDCONF"
exit 1
@@ -90,7 +101,8 @@ deletelsimegatargets()
$RM -f /tmp/$$.conf
exit 1
fi
- $MV /tmp/$$.conf $SDCONF
+ $CP /tmp/$$.conf $SDCONF
+ $RM -f /tmp/$$.conf >/dev/null 2>&1
}
BD=${BASEDIR:-/}