Need to make a fixlet to run some unix commands to uninstall netbackup

HI All, PLease guide me to have a fixlet made for commands mentioned below:-1:

root@servername:/usr/openv/netbackup/bin/goodies#./netbackup stop
root@servername:/usr/openv/netbackup/bin# ./bp.kill_all
root@servername:/usr/openv/netbackup/bin# /opt/VRTSpbx/bin/vxpbx_exchanged stop
root@servername:/usr/openv/netbackup/bin# /opt/pdde/pddeuninstall.sh -forceclean
root@servername:/usr# rm -rf openv/

Through these we shall be uninstalling the netbackup tool from Unix servers. Thank you!!

Use the create file until command to put your commands into a bash script, set the permissions on the file and run it. Something like the following …

delete _createfile
create file until ##END##

your commands go here

##END##
move _createfile my-bash.sh
wait chmod +X my-bash.sh
wait my-bash.sh

(Edited to include the ‘wait’ command I missed on the chmod command) -TR

1 Like

Note that on some hardened systems the /var partition is not able to have an executable bit (the +X) turned on. You can get around that by having

wait /bin/sh my-bash.sh

without the chmod command. Plus in the example you would have to put a wait in front of the chmod :slight_smile:

2 Likes

Thanks for the correction/update. I hadn’t ever considered the inability to set the Execute bit. I’ll have to add that to the toolkit.

IANALG
(I am not a Linux Guru)