4 Replies Latest reply on Jun 16, 2011 9:06 AM by Bill Robinson

    NSH commands in BLPackage External Commands

    Amir Khamis

      Can anyone please help me figure out how to use an NSH command inside a BLPackage external commands?

      thanks

        • 1. Re: NSH commands in BLPackage External Commands
          Bill Robinson

          install nsh on the target.

           

          external command execute in the context of the remote system, so whatever is being run in the command needs to exist on the target system.

          • 2. Re: NSH commands in BLPackage External Commands
            Amir Khamis

            Thanks Bill,

            Will do.  In that case I will just need to execute using nsh - c cp //server/files/* //serverb/files/*

            Is that correct?

             

             

            Regards,

             

            Amir Khamis

            Principal Technology Consultant

            OST (Open Systems Technologies)

            605 Seward NW, Grand Rapids, MI  49504

            Phone: 616-574-3505

            Email:  <mailto:akhamis@ostusa.com> akhamis@ostusa.com<mailto:akhamis@ostusa.com>

            Facebook: <https://m.facebook.com/OpenSystemsTechnologies?_rdr> https://m.facebook.com/OpenSystemsTechnologies?_rdr

            • 3. Re: NSH commands in BLPackage External Commands
              Amir Khamis

              for the record,

              Bill is right, it is better to install NSH on every server, I tried something like this from a central server:

              Within the command you can utilize a local or custom property classes that you have created, for example:

              /bin/subladmin -c "nsh -c \"cp –r//SERVERA/SOURCE-DIR/DIRANDFILES //??PROPERTY-XYZ??/DISTINATION-DIR\""

              but the developer needs to deploy the BLPackage on the target host and perform other steps, like config files etc...

              If the developer was able to use the BL Depot to store his files, then we will not have a problem.  The problem is when we need to pickup files from a server at run time, something File Deploy does, but need this feature in a BLPackage to utlize properties  and/or  custom property classes.  I worked on a  similar request at a diffrent customer site and was able to do all of that using an NSH/BLCLI script which even used Component Templates and was very powerful, but  it is not simple and the developer  will need to spend a lot of time to acomplish that unless I missed something?

              I think I should submit an enhancment request to enable a BLPackage to pickup files from a remote server during run time excatly like file deploy, would you guys agree with that or I am on my own here?

               

              thanks


              • 4. Re: NSH commands in BLPackage External Commands
                Bill Robinson

                installing nsh on every server and then managing acls so this works is not the right way to do this.

                 

                if you want to copy files from one server to another, use a file deploy job, or a nsh job w/ cp or dsync.

                 

                if you want to copy files and then deploy some other stuff, use a batch job that contains the FDJ and the deploy job.

                 

                you might also try using a depot software and the 'agent mount at staging' option.