Hi
We are working in the following fixlet:
/////////////////////////////////////////////////////////////
// Descarga de paquetes
/////////////////////////////////////////////////////////////
if {name of operating system starts with “Linux”}
prefetch sshkey-scanner-localonly.sh sha1:015de8d5d4625880197ae55231a1a3b5b7096898 size:17429 GTSProtocol://127.0.0.1:52311/Uploads/015de8d5d4625880197ae55231a1a3b5b7096898/sshkey-scanner-localonly.sh
parameter “OS_script”="sshkey-scanner-localonly.sh"
endif
if {name of operating system starts with “AIX”}
prefetch sshkey-scanner-localonly.ksh sha1:e1cfe970300174e22007b3a35c64b52066c188b1 size:16943 GTSProtocol://127.0.0.1:52311/Uploads/e1cfe970300174e22007b3a35c64b52066c188b1/sshkey-scanner-localonly.ksh
parameter “OS_script”="sshkey-scanner-localonly.ksh"
endif
if {name of operating system starts with “Sun”}
prefetch sshkey-scanner-localonly.ksh sha1:e1cfe970300174e22007b3a35c64b52066c188b1 size:16943 GTSProtocol://127.0.0.1:52311/Uploads/e1cfe970300174e22007b3a35c64b52066c188b1/sshkey-scanner-localonly.ksh
parameter “OS_script”="sshkey-scanner-localonly.ksh"
endif
if {name of operating system starts with “HP-UX”}
prefetch sshkey-scanner-localonly.ksh sha1:e1cfe970300174e22007b3a35c64b52066c188b1 size:16943 GTSProtocol://127.0.0.1:52311/Uploads/e1cfe970300174e22007b3a35c64b52066c188b1/sshkey-scanner-localonly.ksh
parameter “OS_script”="sshkey-scanner-localonly.ksh"
endif
/////////////////////////////////////////////////////////////
// Inicio de ejecucion del script
/////////////////////////////////////////////////////////////
delete __appendfile
appendfile mv "_Download/{parameter “OS_script”}" "/tmp/{parameter “OS_script”}"
appendfile chmod -R 775 "/tmp/{parameter “OS_script”}"
appendfile “/tmp/{parameter “OS_script”}” >> "/tmp/ssh_keyshostname
.log"
delete run.sh
move __appendfile run.sh
wait chmod 775 run.sh
wait sh ./run.sh
As you can see, we work with different platforms. For the most of them we use a ksh script, but for Linux we need to send a sh script.
On the other hand for Linux has been observed is needed execute the sh script as root user, and we used two different ways but with the same error. Fixlet says Exit code 0 but locally in the Linux server in /tmp we can not see as the script is loaded and executed-
The two different ways uses were:
1º Way
delete __appendfile
appendfile mv "_Download/{parameter “OS_script”}" "/tmp/{parameter “OS_script”}"
appendfile chmod -R 775 "/tmp/{parameter “OS_script”}"
appendfile “/tmp/{parameter “OS_script”}” >> "/tmp/ssh_keyshostname
.log"
delete run.sh
move __appendfile run.sh
wait chmod 775 run.sh
if {name of operating system starts with “Linux”}
//wait sh runuser -l root -c “./run.sh” 1º
//wait su - root -c sh ./run.sh 2º
wait runuser -l root -c sh ./run.sh
else
wait sh ./run.sh
endif
2º Way
/////////////////////////////////////////////////////////////
// Inicio de ejecucion del script
/////////////////////////////////////////////////////////////
if {name of operating system starts with “Linux”}
delete __appendfile
appendfile mv "_Download/{parameter “OS_script”}" "/tmp/{parameter “OS_script”}"
appendfile chmod -R 775 "/tmp/{parameter “OS_script”}"
appendfile “/tmp/{parameter “OS_script”}” >> "/tmp/ssh_keyshostname
.log"
delete run.sh
move __appendfile run.sh
wait chmod 775 run.sh
wait runuser -l root -c sh ./run.sh
else
delete __appendfile
appendfile mv "_Download/{parameter “OS_script”}" "/tmp/{parameter “OS_script”}"
appendfile chmod -R 775 "/tmp/{parameter “OS_script”}"
appendfile “/tmp/{parameter “OS_script”}” >> "/tmp/ssh_keyshostname
.log"
delete run.sh
move __appendfile run.sh
wait chmod 775 run.sh
wait sh ./run.sh
endif
But with any of them we obtained a good result.
Please can you help me ?
Thanks in advance