Linux – script not run after reboot from /etc/rc3.d

bashlinuxsolarissymbolic-link

I create symbolic link to the file – /etc/rc3.d/platform.bash from /var/tmp/platform.bash

      ln -s  /var/tmp/platform.bash   /etc/rc3.d/platform.bash

script exist under /var/tmp :

      -rwxr-xr-x   1 root     root       58442 Aug 30 08:49 platform.bash

view from /etc/rc3.d :

          lrwxrwxrwx   1 root     root          31 Aug 30 06:33 S99platform.bash -> /var/tmp/platform.bash

my target is to run platform.bash after reboot ( on solaris 10 OS )

from some reason the script platform.bash not run after reboot ?
please advice what I need to check in order to verify the problem ?

my script ( platform.bash )

      #!/bin/bash


      echo test > /var/tmp/log.txt

Best Answer

Thats not the right way to start the scripts. Your script should have its appropriate S##/K## with it. For example, you should make link as `

/etc/rc3.d/S98platform.bash

` and

/etc/rc3.d/K98platform.bash

as every script runs with its appropriate START and KILL script in a numerical order.

You should follow this artticle tobetter understand the Solaris init scripts process:

http://www.techrepublic.com/article/get-it-done-start-and-stop-applications-automatically-using-solaris-scripts/5034999

Related Topic