NSLU2-Linux
view · edit · print · history

OpenSlug.StartupOptProgram History

Hide minor edits - Show changes to markup

January 14, 2009, at 09:46 AM by RudolfReuter --
January 09, 2009, at 03:48 PM by RudolfReuter --
Changed lines 19-21 from:

echo $PATH | logger

to:

echo $PATH | logger and read it later with logread (as root)

January 09, 2009, at 03:46 PM by RudolfReuter --
Changed line 4 from:

If you want to startup a program from /opt with an init script, like python, you have to modify the PATH in order to make it work. In that phase of startup (runlevel 3) the /opt/bin path is not yet included.\\

to:

If you want to startup a program from /opt with an init script, like python, you have to modify the PATH in order to make it work. In that phase of startup (runlevel 3) the /opt/bin path is not yet included.\\

Changed lines 16-18 from:

echo $PATH and copy the output into the above.
You can verify the path by including:\\

to:

echo $PATH and copy the output into the above export ... statement.
You can verify the path by including in your script:\\

Changed lines 27-28 from:

The prefix S80 means that it is a Start script, and the number means the place in a startup sequence from 0 to 99. Numbers could be duplicated.

to:

The prefix S80 means that it is a Start script, and the number means the place in a startup sequence from 0 to 99. Numbers could be duplicated.

January 09, 2009, at 03:40 PM by RudolfReuter --
Changed line 10 from:

export PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/opt/bin

to:

export PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/opt/bin

Changed lines 15-17 from:

(probably root). From the command prompt as that user, type "echo $PATH" and copy the output into the above.

to:

(probably root). From the command prompt as that user, type echo $PATH and copy the output into the above.

Changed lines 21-22 from:

For beginners I want to mention, that you will place your script as an example in /etc/init.d/moin.sh and make to it a symbolic link in /etc/rc3.d with:

to:

For beginners I want to mention, that you will place your script as an example in /etc/init.d/moin.sh and make to it a symbolic link in /etc/rc3.d with:

January 09, 2009, at 03:35 PM by RudolfReuter --
Added lines 1-28:

StartupOptProgram How to Startup an /opt program from /etc/init.d

Back to HowTo

If you want to startup a program from /opt with an init script, like python, you have to modify the PATH in order to make it work. In that phase of startup (runlevel 3) the /opt/bin path is not yet included.
After the initial comments but before any executable lines, add a line like:

(:table border=1 width=100% bgcolor=#ffffff:) (:cell:) export PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/opt/bin (:tableend:)

to your script except that you should replace the path I used above with whatever is the correct path is on your system for the user who runs the init script (probably root). From the command prompt as that user, type "echo $PATH" and copy the output into the above.
You can verify the path by including:
echo $PATH | logger
For beginners I want to mention, that you will place your script as an example in /etc/init.d/moin.sh and make to it a symbolic link in /etc/rc3.d with:
$ ln -s /etc/init.d/moin.sh /etc/rc3.d/S81moin
The actual runlevel can be checked with the command runlevel. Usually it is 3 (rc3.d).
The prefix S80 means that it is a Start script, and the number means the place in a startup sequence from 0 to 99. Numbers could be duplicated.

2009-01-09 RudolfReuter

view · edit · print · history · Last edited by RudolfReuter.
Originally by RudolfReuter.
Page last modified on January 14, 2009, at 09:46 AM