LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rc.local - won't run (https://www.linuxquestions.org/questions/linux-software-2/rc-local-wont-run-749639/)

boxb29 08-23-2009 08:22 PM

I got it working finally. Took a slightly different route:

1. created a script /etc/init.d/hamtun
Code:

#!/bin/bash

# script to load tuncfg then hamachi at boot

sudo /usr/src/tuncfg/tuncfg
sudo /usr/src/hamachi/hamachi start

2.
Code:

chmod +x /etc/init.d/hamtun
3. execute this command to link the script to boot

Code:

update-rc.d hamtun defaults
4. reboot...and it works.

One note: tuncfg was loading all along, but not in the right order. If I remove the "tuncfg" line from this script and JUST load "hamachi start", it does not work because hamachi is being loaded before tuncfg. So, I suspect when I am loading tuncfg in this script it is getting loaded again elsewhere at boot - but that doesn't hurt anything.

Thanks all for the help!

boxb29 08-23-2009 08:28 PM

I got it working finally. Took a slightly different route:

1. created a script /etc/init.d/hamtun
Code:

Code:

#!/bin/bash

# script to load tuncfg then hamachi at boot

sudo /usr/src/tuncfg/tuncfg
sudo /usr/src/hamachi/hamachi start

2.
Code:

Code:

chmod +x /etc/init.d/hamtun
3. execute this command to link the script to boot

Code:

Code:

update-rc.d hamtun defaults
4. reboot...and it works.

One note: tuncfg was loading all along, but not in the right order. If I remove the "tuncfg" line from this script and JUST load "hamachi start", it does not work because hamachi is being loaded before tuncfg. So, I suspect when I am loading tuncfg in this script it is getting loaded again elsewhere at boot - but that doesn't hurt anything.

Thanks all for the help!


All times are GMT -5. The time now is 07:29 AM.