porting AIX cron script to Linux

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf porting AIX cron script to Linux

  • Creator
    Topic
  • #55685
    Michael Hertel
    Participant

      Hi all, what am I doing wrong? It works in AIX, but this is Linux.

      Crontab looks like this:

      41 * * * * /home/hci/crontab/vsiep01_maintenance.ksh >> /home/hci/crontab/hourly_output 2>&1

      Top of cron script looks like this:

      #!/usr/bin/ksh

      export FPATH=/hci/cis6.2/integrator/kshlib

      setroot /hci/cis6.2/integrator/

      ################

      # Housekeeping

      ################

      echo

      echo “STARTING THE MAINTENANCE.KSH SCRIPT”

      echo

      date

      Error looks like this:

      /home/hci/crontab/vsiep01_maintenance.ksh[3]: setroot[49]: /integrator/sbin/hcisetenv: not found [No such file or directory]

      STARTING THE MAINTENANCE.KSH SCRIPT

      Mon Apr 23 12:41:01 PDT 2018

    Viewing 2 reply threads
    • Author
      Replies
      • #86162
        Peter Heggie
        Participant

          Something in the path? does setroot use a variable for the beginning of the full directory path?

          It says /integrator/sbin/hcisetenv: not found

          why doesn’t it say /hci/cis6.2/integrator/sbin/hcisetenv: not found

          something is missing in the .profile or it is referring to a variable that does not exist or is not set.

          CL_INSTALL_DIR ?

          Are you going from an HA environment to a non-HA environment? or did you used to refer to /etc/environment?

          In ours we have this stanza:

          # begin HCIenv 6.2

          FPATH=/hci/cis6.2/integrator/kshlib

          CL_INSTALL_DIR=/hci/cis6.2

          # end HCIenv 6.2

          Peter Heggie

        • #86163
          Michael Hertel
          Participant

            The following works inside the script now:

            FPATH=/hci/cis6.2/integrator/kshlib

            export FPATH

            CL_INSTALL_DIR=/hci/cis6.2

            export CL_INSTALL_DIR

            setroot

            Perhaps I was exporting FPATH wrong earlier.

            FPATH shows where “setroot, setsite, setremote” is located.

            CL_INSTALL_DIR is needed everywhere

            That’s why it said /integrator/sbin/hcisetenv: not found

            Apparently CL_INSTALL_DIR was not set yet.

            For the life of me I couldn’t get it to execute the /etc/profile, ~/.bash_profile, ~/.bashrc nor ~/.profile

            All this is done in one of those files.

            So since this works by adding it directly into the script, I am not going to waste anymore time playing with this.

            Peter, my hair (what little I have left) burst into flames when you mentioned HA.

            😛

          • #86164
            Peter Heggie
            Participant

              oh man, today is a bad day to mention HA. We tried to failover today (planned) and the HA would not sync. Had to do it manually and reboot both sides..

              So we did have code in .profile to set the CL_INSTALL_DIR but it was commented out because we moved the logic, to set that variable, into /etc/environment

              which does give us trouble when we have two versions of Cloverleaf in use at the same time…

              Peter Heggie

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.