1833596 Members
3375 Online
110061 Solutions
New Discussion

gtar script problem

 
Peter Remirez
Occasional Advisor

gtar script problem

Hi,
I have a script(attached) which extracts SSH packages from the path /stor/common/src/makehost/DIST/hp9000/hpux/11.00/ssh/B.11.00. into the respective areas of the local machine i.e. /usr/bin, /etc.

The path above is in the NFS area. However, when I executed the attached script, it produced the error shown below.

Moreover, the function checkSSHd in the script is not even executed.

Could someone point to me where and how I could solve these problems? I had tried executing the gzip command with exact options specified in the script on the command line and found no error to it.

Thanks in advance

# ./DO.bak.1
/stor/common/src/makehost/DIST/hp9000/hpux/11.00/ssh
B.11.00
Extracting binary files ...
/stor/common/src/makehost/DIST/hp9000/hpux/11.00/ssh/B.11.00
tar (child): Cannot exec gzip: No such file or directory
tar (child): Error is not recoverable: exiting now
/usr/intel/bin/gtar: Child returned status 2
/usr/intel/bin/gtar: Error exit delayed from previous errors
tar (child): Cannot exec gzip: No such file or directory
tar (child): Error is not recoverable: exiting now
./
scp
sftp
sftp-server
sftp2
tar (child): Cannot exec gzip: No such file or directory
tar (child): Error is not recoverable: exiting now
tar (child): Cannot exec gzip: No such file or directory
tar (child): Error is not recoverable: exiting now
./
/usr/intel/bin/gtar: Child returned status 2
/usr/intel/bin/gtar: Error exit delayed from previous errors
sshd
sshd2
tar (child): Cannot exec gzip: No such file or directory
tar (child): Error is not recoverable: exiting now
tar (child): Cannot exec gzip: No such file or directory
tar (child): Error is not recoverable: exiting now
./
/usr/intel/bin/gtar: Child returned status 2
/usr/intel/bin/gtar: Error exit delayed from previous errors
man1/
man1/scp.1
man1/sftp-server.1
man1/sftp.1
man1/ssh-add.1
man1/ssh-agent.1
man1/ssh-askpass.1
man1/ssh-keygen.1
man1/ssh-probe.1
man1/ssh-signer.1
man1/ssh.1
man1/ssh-add2.1
x /etc/ssh2/sshd2_config, 4327 bytes, 9 tape blocks
x /etc/ssh2/ssh_dummy_shell.out, 122 bytes, 1 tape blocks
x /etc/ssh2/ssh2_config, 1950 bytes, 4 tape blocks
kill: 23220: The specified process does not exist.
kill: 23223: The specified process does not exist.
Postinstallation ...
Creating symbolic links ...
Done.
Checking s750sshd link ...
#


4 REPLIES 4
Donny Jekels
Respected Contributor

Re: gtar script problem

Peter,

If you are using gnu tar then you don't have to or rather can't use gtar -tzvf.

instead the z option in tar tells tar to use its built in gzip function to either extract the file or compress it.


I would change the gtar to just

tar -xzvf

or

tar -czvf

peace
Donny
"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: gtar script problem

one more thing.

in shel scripts. functions goes at the top.

before it is called.

sshme () {

}


sshme
"Vision, is the art of seeing the invisible"
Francisco J. Soler
Honored Contributor

Re: gtar script problem

Hi,
it is possible that gtar calls gzip utility,
you must put in your path the gzip command, it could be installed in /usr/contrib/bin and not in path.

The easiest way to put in in the path is to make a symbolic link between the existing gzip and another one in /bin or /usr/bin.

if you have not installed gzip, go to:
http://hpux.cs.utah.edu/hppd/hpux/Gnu/gzip-1.3.3/

HTH.
Frank.
Linux?. Yes, of course.
Armin Kunaschik
Esteemed Contributor

Re: gtar script problem

Hi there,

gtar has NO gzip builtin! And no compress builtin
and no other compression builtin.
It always relys on the installed compressor.
It's just the integration which is builtin :-)
Do a tar -ztvf and check the processes with ps -ef!
You will find a gtar and a gzip started as a child by gtar.

The error message looks quite clear. gzip is not found in the path.
Add the gzip path in the PATH variable IN the script,
don't assume it's set by the current environment!

Armin
And now for something completely different...