Action 1 (default)
Action Link Click
here to deploy the Tivoli Endpoint Manager Relay 8.1.634.0 upgrade.
Script Type
BigFix Action Script
if { name of operating system = "AIX 6.1" }
prefetch BESRelayUpgrade.pkg sha1:7a45f7b648ca3ac53ec390d1d53c323a20695fb1 size:9131008 http://software.bigfix.com/download/bes/81/BESRelay-8.1.634.0.ppc_aix61.pkg
elseif { name of operating system = "AIX 5.3" }
prefetch BESRelayUpgrade.pkg sha1:00b6d3efdfc37704c3546304971bc95e573baae2 size:7663616 http://software.bigfix.com/download/bes/81/BESRelay-8.1.634.0.ppc_aix53.pkg
else
continue if false
endif
delete "/var/tmp/BESRelayUpgrade.pkg"
continue if {9131008 < free space of drive of folder "/var/tmp"}
move __Download/BESRelayUpgrade.pkg "/var/tmp/BESRelayUpgrade.pkg"
delete "{(client folder of current site as string) & "/__createfile"}"
createfile until __EOF
#!/bin/sh
preserve_symlinks() {"%7b"}
tmpdir=/tmp/${"%7b"}${"%7d"}_bes_upgrade_fixlet
/bin/rm -fr $tmpdir
/bin/mkdir $tmpdir
if [ -L /var/opt/BESRelay ]; then
/bin/ls -l /var/opt/BESRelay | /bin/awk '{"%7b"} print $11 {"%7d"}' > ${"%7b"}tmpdir{"%7d"}/var_opt_BESRelay
/bin/rm /var/opt/BESRelay
fi
{"%7d"}
restore_symlinks() {"%7b"}
if [ -f ${"%7b"}tmpdir{"%7d"}/var_opt_BESRelay ]; then
dst=`/bin/cat ${"%7b"}tmpdir{"%7d"}/var_opt_BESRelay`
for f in `/bin/ls -a /var/opt/BESRelay`; do
if [ $f = '.' -o $f = '..' ]; then
continue
fi
/bin/rm -fr ${"%7b"}dst{"%7d"}/$f
/bin/mv /var/opt/BESRelay/$f ${"%7b"}dst{"%7d"}/$f
done
/bin/rm -fr /var/opt/BESRelay
/bin/ln -s $dst /var/opt/BESRelay
fi
{"%7d"}
preserve_symlinks
/usr/sbin/installp -u BESRelay
/usr/sbin/installp -agqYXd /var/tmp/BESRelayUpgrade.pkg BESRelay
/bin/rm -f /var/tmp/BBESRelayUpgrade.pkg
/etc/rc.d/rc2.d/KBESRelayd stop
restore_symlinks
/etc/rc.d/rc2.d/SBESRelayd start_skipclientrestart
/bin/rm -fr $tmpdir
__EOF
delete /var/tmp/besrelayupgrade
move "{(client folder of current site as string) & "/__createfile"}" /var/tmp/besrelayupgrade
wait chmod 555 /var/tmp/besrelayupgrade
wait /var/tmp/besrelayupgrade
delete /var/tmp/besrelayupgrade
continue if {exists running service "BESRelay"}
relay select
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.