RE: [opensuse] Starting things as root at boot time
I've recently installed the Squid web proxy cache. To start the daemon, I have to su and type /usr/sbin/squid. Is there a simple way of doing this automagically whenever I start my machine? -- ~~~~~ Put the command in /etc/init.d/boot.local ~James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 01 May 2007 21:09:26 James D. Parra wrote:
I've recently installed the Squid web proxy cache. To start the daemon, I have to su and type /usr/sbin/squid. Is there a simple way of doing this automagically whenever I start my machine? -- ~~~~~
Put the command in /etc/init.d/boot.local
~James
Many thanks, James and riccardo. -- Bob openSUSE 10.2 x86_64, Kernel 2.6.18.8-0.1, KDE 3.5.6 r31.4 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2007-05-01 at 21:25 +0100, Bob Williams wrote:
Put the command in /etc/init.d/boot.local
Many thanks, James and riccardo.
That's not the way to do it. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGOGtMtTMYHG2NR9URArmtAJ9Zw5w/GYjjo4pROSjU63h5HIoLwwCZAdTu 5lHSN2Pfa1qfhi8dFtFsDIE= =A9fE -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 02 May 2007, Carlos E. R. wrote:
The Tuesday 2007-05-01 at 21:25 +0100, Bob Williams wrote:
Put the command in /etc/init.d/boot.local
Many thanks, James and riccardo.
That's not the way to do it.
The (or one of the) right way to do it is to use 'insserv' insserv squid and all dependency is resolved and things will get started in right order. Yes you can do it in YaST but that will take much longer time than to type in this commando. regards j -- Jonas Helgi Palsson "Microsoft is not the answer. Microsoft is the question. NO is the answer." -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jónas Helgi Pálsson wrote:
On Wednesday 02 May 2007, Carlos E. R. wrote:
The Tuesday 2007-05-01 at 21:25 +0100, Bob Williams wrote:
Put the command in /etc/init.d/boot.local Many thanks, James and riccardo. That's not the way to do it.
The (or one of the) right way to do it is to use 'insserv'
insserv squid
and all dependency is resolved and things will get started in right order. Yes you can do it in YaST but that will take much longer time than to type in this commando.
regards j
I think YaST does something slightly different to insserv, my /etc/insserv.conf file contains no references to squid (or a lot of other stuff which is enabled via YaST) there is a named entry in this file but again this was originally enabled via YaST. I think this may be a case of use insserv or use YaST but not both, as YaST may not update the /etc/insserv.conf file.... I am not going to test this but this could lead to duplicate entries in the runlevel folders.... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGOIPOasN0sSnLmgIRAvcgAJwNNGNlXeYSDuAAZGCzY+of0Jd77ACfRaWD djAfm2EWDVCdwUF39WHpn34= =OFfY -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 02 May 2007, G T Smith wrote:
I think YaST does something slightly different to insserv, my /etc/insserv.conf file contains no references to squid (or a lot of other stuff which is enabled via YaST) there is a named entry in this file but again this was originally enabled via YaST. I think this may be a case of use insserv or use YaST but not both, as YaST may not update the /etc/insserv.conf file.... I am not going to test this but this could lead to duplicate entries in the runlevel folders....
man 8 insserv "insserv scans for System Facilities in the configuration file /etc/insserv.conf and each file in the directory /etc/insserv.conf.d/. Each line which begins with $ and a following name defines a system facility accordingly to the Linux Standard Base Specification (LSB), All names followed by such a system facility will declare the required dependencies of the facility." And the /etc/init.d/squid file will have reference to those facilities, which are used to determine the starting order of the scripts. Nothing about squid is required there. If one looks at the /etc/init.d/squid file one can see: ### BEGIN INIT INFO # Provides: squid # Required-Start: $local_fs $remote_fs $network $named $time # X-UnitedLinux-Should-Start: apache # Required-Stop: $local_fs $remote_fs $network # X-UnitedLinux-Should-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Squid web cache # Description: Start the Squid web cache, providing # HTTP, FTP and other proxy services ### END INIT INFO So $local_fs $remote_fs $network $named $time is required to start before Squid. insserv has referance to all those requirements. But if one wants to see what scripts provides e.g. network one can issue: #grep 'Provides.*network' /etc/init.d/* /etc/init.d/network:# Provides: network insserv is IMHO rather save, I can issue "insserv sshd" many times on my system, it does not do anything as sshd is enabled, "insserv -r sshd" will remove sshd. regards j -- Jonas Helgi Palsson "Microsoft is not the answer. Microsoft is the question. NO is the answer." -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2007-05-02 at 13:27 +0100, G T Smith wrote:
The (or one of the) right way to do it is to use 'insserv'
insserv squid
and all dependency is resolved and things will get started in right order. Yes you can do it in YaST but that will take much longer time than to type in this commando.
chkconfig is more complete - it calls insserv, in fact.
I think YaST does something slightly different to insserv, my /etc/insserv.conf file contains no references to squid (or a lot of other stuff which is enabled via YaST) there is a named entry in this file but again this was originally enabled via YaST.
Doesn't matter.
I think this may be a case of use insserv or use YaST but not both, as YaST may not update the /etc/insserv.conf file.... I am not going to test this but this could lead to duplicate entries in the runlevel folders....
Don't worry about that file, and use yast, insserv, or chkconfig indistinctly - the master "configuration" isn't there. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGOJDVtTMYHG2NR9URAgtFAJ9f86geQBrNSJPllqNhrxrTFq39YQCbBUx+ lH8tyKt3M5iAj3LCM0iaOek= =xck5 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Carlos E. R. wrote:
The Wednesday 2007-05-02 at 13:27 +0100, G T Smith wrote:
The (or one of the) right way to do it is to use 'insserv'
insserv squid
and all dependency is resolved and things will get started in right order. Yes you can do it in YaST but that will take much longer time than to type in this commando.
chkconfig is more complete - it calls insserv, in fact.
I think YaST does something slightly different to insserv, my /etc/insserv.conf file contains no references to squid (or a lot of other stuff which is enabled via YaST) there is a named entry in this file but again this was originally enabled via YaST.
Doesn't matter.
I think this may be a case of use insserv or use YaST but not both, as YaST may not update the /etc/insserv.conf file.... I am not going to test this but this could lead to duplicate entries in the runlevel folders....
Don't worry about that file, and use yast, insserv, or chkconfig indistinctly - the master "configuration" isn't there.
Thanks, that clarifies something for me, while it was fairly obvious that insserv would not work if the relevant script was not in /etc/init.d, what was not clear to me was how accurate the man page was for the SuSE configuration (e.g. /etc/insserv.conf.d/ does not exist)... and what the interactions were with other tools. I would guess that what YaST does is provide a GUI front end for chkconfig. Been a bit lazy about finding out what the command line options were given that the GUI did the job .... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGOKltasN0sSnLmgIRAsdlAJ9J/ugzqMlnkhIWp4UZeNZgAHQ0/ACdG+JN 7sO8Jc1Pf4pG9IZwsOS4wr8= =AM25 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2007-05-02 at 16:08 +0100, G T Smith wrote:
I would guess that what YaST does is provide a GUI front end for chkconfig. Been a bit lazy about finding out what the command line options were given that the GUI did the job ....
I don't know if it is a front end or a duplication. chkconfig is a perl script, that I know. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGOO6VtTMYHG2NR9URAkWBAJ0VRFKxb0SfWpAhkXg2FEKpyHkxwgCfWM4e 7oBZl93zCxfLDCa5GLXZtDQ= =KrV9 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Bob Williams
-
Carlos E. R.
-
G T Smith
-
James D. Parra
-
Jónas Helgi Pálsson