1846135 Members
4938 Online
110254 Solutions
New Discussion

Re: Shell Script help

 
Peter Remirez
Occasional Advisor

Shell Script help

HI,

I have a script attached which installs the SSH modules from a source to a destination directory. The source directory resides on the NIS server, which is already exported to all client machines.

Are there any other better ways which I could copy the respective packages from the source dir without impacting the NIS/NFS traffic?

What the script does is to extract the directory contents via the NFS.

On the other hand, if I were to copy it directly from the NFS area to the local disk i.e. /usr/bin, /usr/sbin and /usr/man, it may also impact the network traffic.

Hence, could some kindly show me a better way of solving this problem?

4 REPLIES 4
Jean-Louis Phelix
Honored Contributor

Re: Shell Script help

Hi,

You could have a look at SD. Use the swpackage command to create a real product which will appear in the swlist output. This way you will know which release is installed on which system. Use preinstall, postintall, chechinstall, etc. scripts to make all controls. But anyway, bits will be transfered on your network ...

Regards.
It works for me (© Bill McNAMARA ...)
Francisco J. Soler
Honored Contributor

Re: Shell Script help

Hi,
One idea could be copy the source files to destination via ftp, and install it locally.

To do it with a script i use ncftp client because is easier than classical ftp. Take a look in:
http://hpux.connect.org.uk/hppd/hpux/Networking/FTP/ncftp-3.1.4/

Frank.
Linux?. Yes, of course.
Joris Denayer
Respected Contributor

Re: Shell Script help

Hi,

To limit traffic a bit, you could do following actions on the server.
- tar the ./bin, ./sbin and ./man directories in ssh_bin.tar, ssh_sbin.tar and ssh_man.tar
- compress the files with your favourite compressor gzip, compress, pack,...
You will now have ssh_bin.tar.gz, ... (if you use gzip f.i.)

- Modify the script a little bit in order to use the compressed tarfiles as input.

something like
cd /usr/sbin
gunzip -c $INSTALL/$VER/ssh_bin.tar.gz | tar xf -

This will reduce the nfs/network traffic depending on the compression ratio.

Joris
To err is human, but to really faul things up requires a computer
Peter Remirez
Occasional Advisor

Re: Shell Script help

Jean Louis,

Would you mind showing me how I could use the swpackage to create such products in the swlist?

How is this method(together with the postinstall, preinstall and checkinstall going to help me in reducing the network traffic to the local disk?

Could you kindly help me out?

Thanks