[opensuse] Need to add an init script

Hello I need to add an init script to the /etc/rc.d directory to run on init 3 and init 5 for my DHCPD server. I try to add it /etc/rc.d/ and replaced the dhcpd script there and then created a line to /etc/init/rc3.d/S03dhcpd and /etc/init/rc3.d/K03dhcpd, but it doesn't seem to be seen on reboot or when I drop it down to init 1 and then back up to init 3 I also want to run two lines to the network initiation and the /etc/rc.d/network script is just such a cludge now, I can't seem to find a place to add it to that script...so I'd like to just get around it by adding another script file to add my customization after the networking is up. Ruben -- http://www.mrbrklyn.com - Interesting Stuff http://www.nylxs.com - Leadership Development in Free Software So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://fairuse.nylxs.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 "Yeah - I write Free Software...so SUE ME" "The tremendous problem we face is that we are becoming sharecroppers to our own cultural heritage -- we need the ability to participate in our own society." "> I'm an engineer. I choose the best tool for the job, politics be damned.< You must be a stupid engineer then, because politcs and technology have been attached at the hip since the 1st dynasty in Ancient Egypt. I guess you missed that one." © Copyright for the Digital Millennium -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

On 12/14/2009 11:44 AM, Ruben Safir pecked at the keyboard and wrote:
Hello
I need to add an init script to the /etc/rc.d directory to run on init 3 and init 5 for my DHCPD server. I try to add it /etc/rc.d/ and replaced the dhcpd script there and then created a line to /etc/init/rc3.d/S03dhcpd and /etc/init/rc3.d/K03dhcpd, but it doesn't seem to be seen on reboot or when I drop it down to init 1 and then back up to init 3
I also want to run two lines to the network initiation and the /etc/rc.d/network script is just such a cludge now, I can't seem to find a place to add it to that script...so I'd like to just get around it by adding another script file to add my customization after the networking is up.
Ruben
Take a look at /etc/init.d/skeleton as it explains how to add your script and is the template you should copy from. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

If you already have a valid init script you can drop it in /etc/init.d/ and use yast2 runlevel to enable it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

Ruben Safir wrote:
Hello
I need to add an init script to the /etc/rc.d directory to run on init 3 and init 5 for my DHCPD server. I try to add it /etc/rc.d/ and replaced the dhcpd script there and then created a line to /etc/init/rc3.d/S03dhcpd and /etc/init/rc3.d/K03dhcpd, but it doesn't seem to be seen on reboot or when I drop it down to init 1 and then back up to init 3
Use e.g. 'insserv' or 'chkconfig' to automagically insert your script correctly. /Per -- Per Jessen, Zürich (0.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

On Mon, 14 Dec 2009 11:44:33 -0500, you wrote:
I need to add an init script to the /etc/rc.d directory to run on init 3 and init 5 for my DHCPD server.
Use /etc/init.d/skeleton as a template for your script and the use insserv to create to necessary symlinks. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

On Tue, Dec 15, 2009 at 12:00:35PM +0100, Philipp Thomas wrote:
On Mon, 14 Dec 2009 11:44:33 -0500, you wrote:
I need to add an init script to the /etc/rc.d directory to run on init 3 and init 5 for my DHCPD server.
Use /etc/init.d/skeleton as a template for your script and the use insserv to create to necessary symlinks.
How does it (iinserv) know what priority to give a script. It just made a script dependent on networking S01
Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-- http://www.mrbrklyn.com - Interesting Stuff http://www.nylxs.com - Leadership Development in Free Software -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

On Tue, 15 Dec 2009 23:21:35 -0500 Ruben Safir <ruben@mrbrklyn.com> wrote:
How does it (iinserv) know what priority to give a script. It just made a script dependent on networking S01
Hi By these sections in the INIT INFO section, it will change the softlinks accordingly. # Required-Start: $syslog $remote_fs # Should-Start: $time ypbind smtp # Required-Stop: $syslog $remote_fs # Should-Stop: ypbind smtp Have a look at the man page for insserv for more details. -- Cheers Malcolm °¿° (Linux Counter #276890) SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default up 1 day 23:48, 2 users, load average: 0.04, 0.06, 0.07 GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

On Tue, 15 Dec 2009 22:37:42 -0600, you wrote:
By these sections in the INIT INFO section, it will change the softlinks accordingly.
# Required-Start: $syslog $remote_fs # Should-Start: $time ypbind smtp # Required-Stop: $syslog $remote_fs # Should-Stop: ypbind smtp
And if you have other scripts you write yourself, you can use the term you use for Provides: in other *Start/*Stop of other scripts. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

Ruben Safir wrote:
On Tue, Dec 15, 2009 at 12:00:35PM +0100, Philipp Thomas wrote:
On Mon, 14 Dec 2009 11:44:33 -0500, you wrote:
I need to add an init script to the /etc/rc.d directory to run on init 3 and init 5 for my DHCPD server. Use /etc/init.d/skeleton as a template for your script and the use insserv to create to necessary symlinks.
How does it (iinserv) know what priority to give a script. It just made a script dependent on networking S01
You didn't read the template script or you wouldn't have asked that. Go read the template script as suggested already. There are special comments in the scripts that define dependencies and ordering. -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (7)
-
Andrew Joakimsen
-
Brian K. White
-
Ken Schneider - openSUSE
-
Malcolm
-
Per Jessen
-
Philipp Thomas
-
Ruben Safir