DRD-Safe Concepts for HP-UX 11i v2 and Later

#
# Remove the Ignite entries
#
if [[ $SW_SESSION_IS_DRD -ne 1 ]]; then
for dir in $INST_DIR $VAR_DIR
do
setup_tftp -d $dir
done
#
# Issue a message that the Ignite directories have been
# removed from tftp access, but that the tftp service itself is
# still enabled.
# This was changed for JAGad47307.
#
echo "\
NOTE: tftp access to $INST_DIR and $VAR_DIR has been
removed from /etc/inetd.conf. The tftp service is
still enabled. To disable tftp service, run SAM."
else
echo "\
NOTE: tftp access to $INST_DIR and $VAR_DIR will be
removed from /etc/inetd.conf when the inactive
image is booted. The tftp service will remain
enabled. To disable tftp service, run SAM."
initfile=/sbin/init.d/iux_unconf
rcfile=/sbin/rc2.d/S900iux_unconf
rm -rf $rcfile $initfile
print "#!/sbin/sh" > $initfile
print " for dir in $INST_DIR $VAR_DIR" >> $initfile
print " do" >> $initfile
print " /usr/sbin/setup_tftp -d \$dir" >> $initfile
print " done" >> $initfile
print " rm $initfile $rcfile " >> $initfile
print " exit \$? " >> $initfile
chmod 555 $initfile
chown bin:bin $initfile
ln -s $initfile $rcfile
fi