Re: [newbie] Script in the init dir
On Sat, 06 Dec 2003 00:50, Alexandre Aractingi wrote: > I can't seem to be able to run a script when my machine boots up... I > copied it in /etc/init.d/ though, and I can run it from the shell > (/etc/init.d/myscript start), but it's not launched at boot time. Am I > missing something here? Or you can use ksysv... Copy your script to /etc/rc.d/init.d and make permissions 700 (rwx--) owned by root. Open ksysv from a terminal as root and choose "linux" as your OS, then "Mandrake Linux". You can now drag and drop your script into the desired run levels. More info in the KDE docs. Sharrea -- Help Microsoft stamp out piracy - give Linux to a friend today Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Script in the init dir
On Fri, 2003-12-05 at 09:27, Raffaele Belardi wrote: > I thought that the start and stop priority were provided by the > /etc/rcx.d/ symlink names, i.e. > > S03iptables > S10network > > starts iptables before network. Are those two lines relly needed by rc > script, or by some other configuration utility? > > thanks, > > raffaele chkconfig uses that line (the # chkconfig one) to create the symlinks. For more information, take a look at the RUNLEVEL FILES section in "man chkconfg". Saludos, -- Adolfo A. Bello B. <[EMAIL PROTECTED]> Make your posts more effective. Learn how at http://mandrake.vmlinuz.ca/bin/view/Main/MandrakeMailingListEtiquette Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Script in the init dir
I thought that the start and stop priority were provided by the /etc/rcx.d/ symlink names, i.e. S03iptables S10network starts iptables before network. Are those two lines relly needed by rc script, or by some other configuration utility? thanks, raffaele [EMAIL PROTECTED] wrote: On Fri, 2003-12-05 at 07:50, Alexandre Aractingi wrote: I can't seem to be able to run a script when my machine boots up... I copied it in /etc/init.d/ though, and I can run it from the shell (/etc/init.d/myscript start), but it's not launched at boot time. Am I missing something here? Thanks, Startup scripts has to follow some rules. For example, it is mandatory to have a coupe of lines hinting default runlevels and priority at start up and shutdown. Something like: # chkconfig: 2345 90 20 # description: A comment to describe what this script does. You have to handle at least the cases to start and stop the service you are dealing with this script. OTOH, if you are trying to start a program, not a service, you better use rc.local. HTH Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Script in the init dir
Le ven 05/12/2003 à 13:12, Adolfo Bello a écrit : > Startup scripts has to follow some rules. For example, it is mandatory > to have a coupe of lines hinting default runlevels and priority at start > up and shutdown. Something like: > > # chkconfig: 2345 90 20 > # description: A comment to describe what this script does. > > You have to handle at least the cases to start and stop the service you > are dealing with this script. > > OTOH, if you are trying to start a program, not a service, you better > use rc.local. Thanks for your explanations! I'll do that! -- Alexandre Aractingi <[EMAIL PROTECTED]> Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Script in the init dir
On Fri, 2003-12-05 at 07:50, Alexandre Aractingi wrote: > I can't seem to be able to run a script when my machine boots up... I > copied it in /etc/init.d/ though, and I can run it from the shell > (/etc/init.d/myscript start), but it's not launched at boot time. Am I > missing something here? > Thanks, Startup scripts has to follow some rules. For example, it is mandatory to have a coupe of lines hinting default runlevels and priority at start up and shutdown. Something like: # chkconfig: 2345 90 20 # description: A comment to describe what this script does. You have to handle at least the cases to start and stop the service you are dealing with this script. OTOH, if you are trying to start a program, not a service, you better use rc.local. HTH -- Adolfo A. Bello B. <[EMAIL PROTECTED]> Make your posts more effective. Learn how at http://mandrake.vmlinuz.ca/bin/view/Main/MandrakeMailingListEtiquette Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
[newbie] Script in the init dir
I can't seem to be able to run a script when my machine boots up... I copied it in /etc/init.d/ though, and I can run it from the shell (/etc/init.d/myscript start), but it's not launched at boot time. Am I missing something here? Thanks, -- Alexandre Aractingi <[EMAIL PROTECTED]> Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com