Re: Feedback needed: How to disable services at startup... and keep them so.
On Thu, 09 Dec 2010 07:37:19 +0100, Sven Joachim wrote: On 2010-12-08 23:41 +0100, Javier Barroso wrote: On Wed, Dec 8, 2010 at 8:24 PM, Sven Joachim wrote: You should use update-rc.d network-manager disable instead. See update-rc.d(8). I think update-rc.d manpage should then change example which Camaleon referenced in her solved post: Example of disabling a service: update-rc.d -f foobar remove update-rc.d foobar stop 20 2 3 4 5 . That does still work. Not for me. Read: http://lists.debian.org/debian-user/2010/12/msg00482.html http://lists.debian.org/debian-user/2010/12/msg00494.html Or maybe I missed something... again? :-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.09.08.15...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On 2010-12-08 01:21 +0100, Arthur Machlas wrote: Problem is, or at least, what I think the problem with that is, is that insserv is installed by default, and concurrent is now the default as well. So whenever a system service is added removed, changed or when insserv is called by some other means, it will look at the LSB headers for the init script and fix any missing symlinks. Erm no, it does not do that. It will warn you that your configuration does not match the LSB headers, but leave it alone. The only exception is when you have no symlinks at all and run update-rc.d. Haven't tested that, but it's my uninformed opinion. Your uninformed opinion is welcome, but well informed contributions are usually more useful. :-) Sven -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87ei9ruyc9@turtle.gmx.de
Re: Feedback needed: How to disable services at startup... and keep them so.
On Wed, Dec 8, 2010 at 10:38 AM, Camaleón noela...@gmail.com wrote: On Wed, 08 Dec 2010 08:37:52 -0500, Tom H wrote: On Wed, Dec 8, 2010 at 8:23 AM, Camaleón wrote: On Tue, 07 Dec 2010 23:46:53 +0100, Jochem Kossen wrote: You didn't disable network-manager. You removed the startup scripts which were correctly put back by the update. Of course I only know this by being bitten by it several times in the past ;-) Hum... good catch. Let's test it. (...) Now, I restart the system (rebooting...) and check for network manager service, that should have been disabled: t...@debian:~$ /etc/init.d/network-manager status NetworkManager is running. But it is running. update-rc.d ... 20... isn't ging to work with insserv (one reason being that it numbers the /etc/rcX.d scripts indepedently of you). Mmm... man page says by using defaults the service should be put in sequence number 20 (unless there are any conflicts): t...@debian:~$ ls -l /etc/rc* | grep network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager And so it seems to be :-? Did you do the above on a Lenny or Squeeze/Sid box? Whenever I use update-rc.d on a sid box to stop/remove/disable, I get a using concurrency based boot sequencing message with a warning about runlevels. It's just a warning so I guess that it's OK but I don't like it and now avoid update-rc.d. Furthermore, how does insserv deal with the scripts if you assign S20 to network-manager and it depends on a service that insserv has numbered S21? The best way that I've found to deviate from the LSB headers is to use /etc/insserv/overrides/. I'll have to test that, but first I would like to know if there is another method to get the job done. I'd like to understand what I am doing wrong. If you're using Squeeze/Sid and therefore have an insserv-controlled boot-process, why not use an insserv solution? There's more typing to be done but it works. I've just tried update-rc.d -f remove nfs-kernel-server; update-rc.d nfs-kernel server stop 2 3 4 5 . and rebooted to find that nfs-kernel-server is still running. I've also just tried update-rc.d -f disable nfs-kernel-server and rebooted to find that nfs-kernel-server is still running. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktinz06q=swlwhrosqtf4yvjnobh+s3nwkqzly...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On 2010-12-09 09:15 +0100, Camaleón wrote: On Thu, 09 Dec 2010 07:37:19 +0100, Sven Joachim wrote: On 2010-12-08 23:41 +0100, Javier Barroso wrote: On Wed, Dec 8, 2010 at 8:24 PM, Sven Joachim wrote: You should use update-rc.d network-manager disable instead. See update-rc.d(8). I think update-rc.d manpage should then change example which Camaleon referenced in her solved post: Example of disabling a service: update-rc.d -f foobar remove update-rc.d foobar stop 20 2 3 4 5 . That does still work. Not for me. Read: http://lists.debian.org/debian-user/2010/12/msg00482.html http://lists.debian.org/debian-user/2010/12/msg00494.html Or maybe I missed something... again? :-) No, now that I tested it I have to admit you're absolutely right. It seems that update-rc.d actually uses the LSB headers and ignores the command line arguments. I'm not sure that this is intended. Sven -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/877hfjuxgm@turtle.gmx.de
Re: Feedback needed: How to disable services at startup... and keep them so.
On Wed, Dec 8, 2010 at 5:41 PM, Javier Barroso javibarr...@gmail.com wrote: On Wed, Dec 8, 2010 at 8:24 PM, Sven Joachim svenj...@gmx.de wrote: On 2010-12-07 17:21 +0100, Camaleón wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. You should use update-rc.d network-manager disable instead. See update-rc.d(8). I think update-rc.d manpage should then change example which Camaleon referenced in her solved post: Example of disabling a service: update-rc.d -f foobar remove update-rc.d foobar stop 20 2 3 4 5 . Should be Example of disabling a service: update-rc.d foobar disable Shouldn't be ? (Is it a bug in manpage?) It depends on which man page you're reading. The disable option doesn't exist in the (online, no Lenny box at hand) Lenny man page. From the Squeeze man page: DISABLING INIT SCRIPT START LINKS When run with the disable [ S|2|3|4|5 ] options, update-rc.d modifies existing runlevel links for the script /etc/init.d/name by renaming start links to stop links with a sequence number equal to the difference of 100 minus the original sequence number. When run with the enable [ S|2|3|4|5 ] options, update-rc.d modifies existing runlevel links for the script /etc/init.d/name by renaming stop links to start links with a sequence number equal to the positive difference of current sequence number minus 100, thus returning to the original sequence number that the script had been installed with before disabling it. Both of these options only operate on start runlevel links of S, 2, 3, 4 or 5. If no start runlevel is specified after the disable or enable keywords, the script will attempt to modify links in all start run- levels. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktikoj12cigcw=tsh58xe9hhg9t9yfm48+11bo...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Thu, Dec 9, 2010 at 2:56 AM, Joel Roth jo...@pobox.com wrote: On Wed, Dec 08, 2010 at 08:24:51PM +0100, Sven Joachim wrote: On 2010-12-07 17:21 +0100, Camaleón wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. You should use update-rc.d network-manager disable instead. See update-rc.d(8). With that approach, how can you get a list of services that have been disabled using updated-rc.d? Not AFAIK. But you can use service --status-all to get some idea... btw, I am curious that Debian now has several ways to enable/disable services. - installing/removing the package with apt-get - editing the /etc/default/servicename file - managing the symlinks with update-rc.d - the permissions of the /etc/init.d/servicename script I couldn't agree less with your list. :) - installing/removing the package with apt-get It doesn't work for someone who wants to disable samba or nfs-kernel-server in some locations and enable it in others. - editing the /etc/default/servicename file I can't think of anything other than bootlogd that meets this criterion. - managing the symlinks with update-rc.d Yes, although I'm not convinced that Squeeze/Sid with insserv and concurrency booting. - the permissions of the /etc/init.d/servicename script It's a hack (as was the exit 0 suggestion) that'll only work if there's a box has a single admin and the package that owns a script doesn't overwrite it through an update/upgrade. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlkti=iqpo3smsmkjegngrwcgx86nexphsrur=ov...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Thu, 09 Dec 2010 03:54:11 -0500, Tom H wrote: On Wed, Dec 8, 2010 at 10:38 AM, Camaleón wrote: (...) Mmm... man page says by using defaults the service should be put in sequence number 20 (unless there are any conflicts): t...@debian:~$ ls -l /etc/rc* | grep network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager And so it seems to be :-? Did you do the above on a Lenny or Squeeze/Sid box? Squeeze. Whenever I use update-rc.d on a sid box to stop/remove/disable, I get a using concurrency based boot sequencing message with a warning about runlevels. It's just a warning so I guess that it's OK but I don't like it and now avoid update-rc.d. The warning can be ignored but the service levels are not touched and it does not work as expected (meaning, the service is not disabled at all). Furthermore, how does insserv deal with the scripts if you assign S20 to network-manager and it depends on a service that insserv has numbered S21? It can be tweaked or so it says man page :-) The best way that I've found to deviate from the LSB headers is to use /etc/insserv/overrides/. I'll have to test that, but first I would like to know if there is another method to get the job done. I'd like to understand what I am doing wrong. If you're using Squeeze/Sid and therefore have an insserv-controlled boot-process, why not use an insserv solution? There's more typing to be done but it works. Simple, because it wasn't the advertized method for doing it. I've just tried update-rc.d -f remove nfs-kernel-server; update-rc.d nfs-kernel server stop 2 3 4 5 . and rebooted to find that nfs-kernel-server is still running. Yep. But you missed the level number. I've also just tried update-rc.d -f disable nfs-kernel-server and rebooted to find that nfs-kernel-server is still running. Then -Houston- we have additional problems. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.09.11.11...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Thu, Dec 9, 2010 at 6:11 AM, Camaleón noela...@gmail.com wrote: On Thu, 09 Dec 2010 03:54:11 -0500, Tom H wrote: On Wed, Dec 8, 2010 at 10:38 AM, Camaleón wrote: Whenever I use update-rc.d on a sid box to stop/remove/disable, I get a using concurrency based boot sequencing message with a warning about runlevels. It's just a warning so I guess that it's OK but I don't like it and now avoid update-rc.d. The warning can be ignored but the service levels are not touched and it does not work as expected (meaning, the service is not disabled at all). It was silly of me to say that the warning can be ignored given that my own testing showed that nothing was done... Furthermore, how does insserv deal with the scripts if you assign S20 to network-manager and it depends on a service that insserv has numbered S21? It can be tweaked or so it says man page :-) Which man page? Since you're using update-rc.d, of course you can assign a start number higher than 21 with update-rc.d if a service depends on a service that insserv has numbered 21. My point was more how do you know the highest start number that insserv has assigned to a service that service that you're editing depends upon? The best way that I've found to deviate from the LSB headers is to use /etc/insserv/overrides/. I'll have to test that, but first I would like to know if there is another method to get the job done. I'd like to understand what I am doing wrong. If you're using Squeeze/Sid and therefore have an insserv-controlled boot-process, why not use an insserv solution? There's more typing to be done but it works. Simple, because it wasn't the advertized method for doing it. man insserv I've just tried update-rc.d -f remove nfs-kernel-server; update-rc.d nfs-kernel server stop 2 3 4 5 . and rebooted to find that nfs-kernel-server is still running. Yep. But you missed the level number. The level number isn't needed. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktiky=+re1yxiuru_zb2qdlhsxw5ltzprfoxpa...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Thu, 09 Dec 2010 07:07:11 -0500, Tom H wrote: On Thu, Dec 9, 2010 at 6:11 AM, Camaleón wrote: (...) The warning can be ignored but the service levels are not touched and it does not work as expected (meaning, the service is not disabled at all). It was silly of me to say that the warning can be ignored given that my own testing showed that nothing was done... The warning can be ignored (see my last solved marked message): http://lists.debian.org/debian-user/2010/12/msg00505.html The warning is still there but it works. Furthermore, how does insserv deal with the scripts if you assign S20 to network-manager and it depends on a service that insserv has numbered S21? It can be tweaked or so it says man page :-) Which man page? Since you're using update-rc.d, of course you can assign a start number higher than 21 with update-rc.d if a service depends on a service that insserv has numbered 21. My point was more how do you know the highest start number that insserv has assigned to a service that service that you're editing depends upon? You can look at the /etc/init.d/* folder and in the scripts headers. If you're using Squeeze/Sid and therefore have an insserv-controlled boot-process, why not use an insserv solution? There's more typing to be done but it works. Simple, because it wasn't the advertized method for doing it. man insserv I can't see there how to disable a service nor examples on how to achieve it :-? I've just tried update-rc.d -f remove nfs-kernel-server; update-rc.d nfs-kernel server stop 2 3 4 5 . and rebooted to find that nfs-kernel-server is still running. Yep. But you missed the level number. The level number isn't needed. The example command in man page makes use of it, but it neither works :-/ Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.09.12.50...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
Sven Joachim wrote: On 2010-12-09 09:15 +0100, Camaleón wrote: On Thu, 09 Dec 2010 07:37:19 +0100, Sven Joachim wrote: On 2010-12-08 23:41 +0100, Javier Barroso wrote: On Wed, Dec 8, 2010 at 8:24 PM, Sven Joachim wrote: You should use update-rc.d network-manager disable instead. See update-rc.d(8). I think update-rc.d manpage should then change example which Camaleon referenced in her solved post: Example of disabling a service: update-rc.d -f foobar remove update-rc.d foobar stop 20 2 3 4 5 . That does still work. Not for me. Read: http://lists.debian.org/debian-user/2010/12/msg00482.html http://lists.debian.org/debian-user/2010/12/msg00494.html Or maybe I missed something... again? :-) No, now that I tested it I have to admit you're absolutely right. It seems that update-rc.d actually uses the LSB headers and ignores the command line arguments. I'm not sure that this is intended. I think it is, from the manpage: update-rc.d has two modes of operation for installing scripts into the boot sequence. A legacy mode where command line arguments are used to decide the sequence and runlevel configuration, and the default mode where dependency and runlevel information in the init.d script LSB comment header is used instead. Hugo -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/idr0rb$9o...@dough.gmane.org
Re: Feedback needed: How to disable services at startup... and keep them so.
Hi, On Thu, Dec 09, 2010 at 08:15:08AM +, Camaleón wrote: On Thu, 09 Dec 2010 07:37:19 +0100, Sven Joachim wrote: On 2010-12-08 23:41 +0100, Javier Barroso wrote: On Wed, Dec 8, 2010 at 8:24 PM, Sven Joachim wrote: You should use update-rc.d network-manager disable instead. See update-rc.d(8). I think update-rc.d manpage should then change example which Camaleon referenced in her solved post: Example of disabling a service: update-rc.d -f foobar remove update-rc.d foobar stop 20 2 3 4 5 . That does still work. Not for me. Read: http://lists.debian.org/debian-user/2010/12/msg00482.html http://lists.debian.org/debian-user/2010/12/msg00494.html Or maybe I missed something... again? :-) I have not checked recommended way under new concurrent boot system. But /etc/init.d/foobar is conffile. This means changes you make is preserved and respected. Whay not insert exit 0 at the top to disable them. The script is started but does nothing. This is a dirty but simple work around :-) Anyway, you can be root. You can do anything. Osamu -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101209163319.ga9...@debian.org
Re: Feedback needed: How to disable services at startup... and keep them so.
On Fri, 10 Dec 2010 01:33:20 +0900, Osamu Aoki wrote: On Thu, Dec 09, 2010 at 08:15:08AM +, Camaleón wrote: On Thu, 09 Dec 2010 07:37:19 +0100, Sven Joachim wrote: On 2010-12-08 23:41 +0100, Javier Barroso wrote: On Wed, Dec 8, 2010 at 8:24 PM, Sven Joachim wrote: You should use update-rc.d network-manager disable instead. See update-rc.d(8). I think update-rc.d manpage should then change example which Camaleon referenced in her solved post: Example of disabling a service: update-rc.d -f foobar remove update-rc.d foobar stop 20 2 3 4 5 . That does still work. Not for me. Read: http://lists.debian.org/debian-user/2010/12/msg00482.html http://lists.debian.org/debian-user/2010/12/msg00494.html Or maybe I missed something... again? :-) I have not checked recommended way under new concurrent boot system. Is there is a recommended way? Please tell :-) But /etc/init.d/foobar is conffile. This means changes you make is preserved and respected. Whay not insert exit 0 at the top to disable them. The script is started but does nothing. This is a dirty but simple work around :-) Anyway, you can be root. You can do anything. I basically see two issues here: 1/ We lack? for a recommended way/Debian way for disabling scripts (this thread is plenty of alternatives and tips for doing it but documentation is not very clear on the matter). I think it is important for an admin to know how to disable a service, is a must in his/her basic day-to-day job list. 2/ Man page of update-rc.d provides a method for disabling scripts that do not work. I know a new init boot system is to come (systemd?), but that should not be an excuse to do not care on the mature one O:-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.09.17.55...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Thu, Dec 09, 2010 at 04:50:52AM -0500, Tom H wrote: On Thu, Dec 9, 2010 at 2:56 AM, Joel Roth jo...@pobox.com wrote: On Wed, Dec 08, 2010 at 08:24:51PM +0100, Sven Joachim wrote: On 2010-12-07 17:21 +0100, Camaleón wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. You should use update-rc.d network-manager disable instead. See update-rc.d(8). With that approach, how can you get a list of services that have been disabled using updated-rc.d? Not AFAIK. But you can use service --status-all to get some idea... Hi, It returns three results [+] [?] [-] But the docs do not document what these codes signify. btw, I am curious that Debian now has several ways to enable/disable services. - installing/removing the package with apt-get - editing the /etc/default/servicename file - managing the symlinks with update-rc.d - the permissions of the /etc/init.d/servicename script I couldn't agree less with your list. :) I'm not sure I *agree* with my list as a good way to accomplish the goal. Rather as complicating the process of troubleshooting services for a green administrator. (Many people running Debian consider themselves *users*.) - installing/removing the package with apt-get It doesn't work for someone who wants to disable samba or nfs-kernel-server in some locations and enable it in others. - editing the /etc/default/servicename file I can't think of anything other than bootlogd that meets this criterion. There are others. Sort of like a shadow government--you want to do something, but nothing happens till certain significant yet hidden people say yes. (Well, if I don't like it, I suppose I can find some debian-policy list to flame. :-) - managing the symlinks with update-rc.d Yes, although I'm not convinced that Squeeze/Sid with insserv and concurrency booting. I haven't tested it either, however this method has been the bulk of the discussion on the current thread. - the permissions of the /etc/init.d/servicename script It's a hack (as was the exit 0 suggestion) that'll only work if there's a box has a single admin and the package that owns a script doesn't overwrite it through an update/upgrade. I believe the package manager (although not necessarily a sleepy-eyed administrator) will notice difference in permissions or file contents from the package supplied script. btw, I couldn't disagree with you more :-) in that using permissions is certainly a legitimate way to administer a system. What better methods could you suggest? Or are you suggesting we need yet another? Best, Joel -- Joel Roth -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101209180035.ga12...@sprite
Re: Feedback needed: How to disable services at startup... and keep them so.
On 2010-12-09 18:55 +0100, Camaleón wrote: I basically see two issues here: 1/ We lack? for a recommended way/Debian way for disabling scripts (this thread is plenty of alternatives and tips for doing it but documentation is not very clear on the matter). I think it is important for an admin to know how to disable a service, is a must in his/her basic day-to-day job list. There are many ways to do this in sysvinit, and which one works best depends on whether you want to be able to start the service manually. 2/ Man page of update-rc.d provides a method for disabling scripts that do not work. I filed a bug for that (http://bugs.debian.org/606505), proposing to use update-rc.d foobar disable instead. Thanks for the interesting thread, Sven -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87wrniskmz@turtle.gmx.de
Re: Feedback needed: How to disable services at startup... and keep them so.
On Thu, Dec 9, 2010 at 10:26 PM, Sven Joachim svenj...@gmx.de wrote: On 2010-12-09 18:55 +0100, Camaleón wrote: I basically see two issues here: 1/ We lack? for a recommended way/Debian way for disabling scripts (this thread is plenty of alternatives and tips for doing it but documentation is not very clear on the matter). I think it is important for an admin to know how to disable a service, is a must in his/her basic day-to-day job list. There are many ways to do this in sysvinit, and which one works best depends on whether you want to be able to start the service manually. 2/ Man page of update-rc.d provides a method for disabling scripts that do not work. I filed a bug for that (http://bugs.debian.org/606505), proposing to use update-rc.d foobar disable instead. Thanks filling that bug, I didn't have time to send it (and your english is better than mine :) ) I hope this issue is clarified, I don't like ugly hacks in my debian systems ! Regards, -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlkti=bviuny3+j2vsypj+spokg-mppm+s9cwryy...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, Dec 7, 2010 at 2:35 PM, Camaleón noela...@gmail.com wrote: On Tue, 07 Dec 2010 10:51:11 -0600, Arthur Machlas wrote: I'd definitely hold off on the bug report. I think you should look at the lsb headers of the network-manager script in /etc/init.d and change them to stop on all levels, start on none, then run insserv without any arguments to again disable network-manager. If this isn't a future proof method of disabling it then there is definitley a problem in that packages update maintenance scripts. Are you suggesting to manually edit the /etc/init.d/network-manager script header to fit my needs? Correct me if I'm wrong, but I expect this file (as any file located here) can be updated at any time and so replacing any of the customized values I can have written in there :-? You also have to run insserv -r ... to remove the rcX.d start symlinks. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlkti=rry4n-d3d-ew=xxn5ydvbc=djpxhvbytns...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, 07 Dec 2010 23:46:53 +0100, Jochem Kossen wrote: On Tue, 07 Dec 2010 23:46:53 +0100, Jochem Kossen wrote: On Tue, Dec 07, 2010 at 04:21:38PM +, Camale?n wrote: Hello, A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. Open the update-rc.d manpage, search for 'disable' and it says: == A common system administration error is to delete the links with the thought that this will disable the service, i.e., that this will prevent the service from being started. However, if all links have been deleted then the next time the package is upgraded, the package¿s postinst script will run update-rc.d again and this will reinstall links at their factory default locations. The correct way to disable services is to configure the service as stopped in all runlevels in which it is started by default. In the System V init system this means renaming the service¿s symbolic links from S to K. == You didn't disable network-manager. You removed the startup scripts which were correctly put back by the update. Of course I only know this by being bitten by it several times in the past ;-) Hum... good catch. Let's test it. First, I set the defaults runlevels for the script: r...@debian:~# update-rc.d network-manager defaults update-rc.d: using dependency based boot sequencing Then, by following the example provided in the manual page on how to disable a service, I run: r...@debian:~# update-rc.d -f network-manager remove update-rc.d: using dependency based boot sequencing And: r...@debian:~# update-rc.d network-manager stop 20 2 3 4 5 . update-rc.d: using dependency based boot sequencing update-rc.d: warning: network-manager start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5) update-rc.d: warning: network-manager stop runlevel arguments (2 3 4 5) do not match LSB Default-Stop values (0 1 6) Now, I restart the system (rebooting...) and check for network manager service, that should have been disabled: t...@debian:~$ /etc/init.d/network-manager status NetworkManager is running. But it is running. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.08.13.23...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Wed, Dec 8, 2010 at 8:23 AM, Camaleón noela...@gmail.com wrote: On Tue, 07 Dec 2010 23:46:53 +0100, Jochem Kossen wrote: On Tue, 07 Dec 2010 23:46:53 +0100, Jochem Kossen wrote: On Tue, Dec 07, 2010 at 04:21:38PM +, Camale?n wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. Open the update-rc.d manpage, search for 'disable' and it says: == A common system administration error is to delete the links with the thought that this will disable the service, i.e., that this will prevent the service from being started. However, if all links have been deleted then the next time the package is upgraded, the package¿s postinst script will run update-rc.d again and this will reinstall links at their factory default locations. The correct way to disable services is to configure the service as stopped in all runlevels in which it is started by default. In the System V init system this means renaming the service¿s symbolic links from S to K. == You didn't disable network-manager. You removed the startup scripts which were correctly put back by the update. Of course I only know this by being bitten by it several times in the past ;-) Hum... good catch. Let's test it. First, I set the defaults runlevels for the script: r...@debian:~# update-rc.d network-manager defaults update-rc.d: using dependency based boot sequencing Then, by following the example provided in the manual page on how to disable a service, I run: r...@debian:~# update-rc.d -f network-manager remove update-rc.d: using dependency based boot sequencing And: r...@debian:~# update-rc.d network-manager stop 20 2 3 4 5 . update-rc.d: using dependency based boot sequencing update-rc.d: warning: network-manager start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5) update-rc.d: warning: network-manager stop runlevel arguments (2 3 4 5) do not match LSB Default-Stop values (0 1 6) Now, I restart the system (rebooting...) and check for network manager service, that should have been disabled: t...@debian:~$ /etc/init.d/network-manager status NetworkManager is running. But it is running. update-rc.d ... 20... isn't ging to work with insserv (one reason being that it numbers the /etc/rcX.d scripts indepedently of you). The best way that I've found to deviate from the LSB headers is to use /etc/insserv/overrides/. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktimoczyhtjmakcpmcjtjqwm3se_n7cmuukucq...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Wed, 08 Dec 2010 08:37:52 -0500, Tom H wrote: On Wed, Dec 8, 2010 at 8:23 AM, Camaleón wrote: On Tue, 07 Dec 2010 23:46:53 +0100, Jochem Kossen wrote: (...) You didn't disable network-manager. You removed the startup scripts which were correctly put back by the update. Of course I only know this by being bitten by it several times in the past ;-) Hum... good catch. Let's test it. (...) Now, I restart the system (rebooting...) and check for network manager service, that should have been disabled: t...@debian:~$ /etc/init.d/network-manager status NetworkManager is running. But it is running. update-rc.d ... 20... isn't ging to work with insserv (one reason being that it numbers the /etc/rcX.d scripts indepedently of you). Mmm... man page says by using defaults the service should be put in sequence number 20 (unless there are any conflicts): t...@debian:~$ ls -l /etc/rc* | grep network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 S20network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager And so it seems to be :-? The best way that I've found to deviate from the LSB headers is to use /etc/insserv/overrides/. I'll have to test that, but first I would like to know if there is another method to get the job done. I'd like to undertstand what I am doing wrong. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.08.15.38...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, 07 Dec 2010 15:46:50 -0700, Bob Proulx wrote: Arthur Machlas wrote: Camaleón wrote: Are you suggesting to manually edit the /etc/init.d/network-manager script header to fit my needs? Correct me if I'm wrong, but I expect this file (as any file located here) can be updated at any time and so replacing any of the customized values I can have written in there :-? Yes, that is what I am suggesting. And if the upgrade overwrites your changes, you should file a bug report and ask the maintainer to come into compliance with Debian Policy: Let me confirm this. I have done this many times. You are allowed local modification of /etc/init.d/ scripts. (Postfix with SASL requires it.) When a new package is installed it will be handled as a conffile. That is to say that interface will be to ask you (if interactive) whether you want to install the new or keep the old with the default being to keep the old. The files will be saved with a .dpkg-old or .dpkg-new extension as appropriate if you want to merge changes in later. Since the default is to keep your installed and modified file this can never be changed automatically to start the new file. Therefore a very simple way to prevent a service from running is to edit the /etc/init.d/ script and put an 'exit 0' as the second line of the script. Do your self a favor and place a comment there for you to read when you come back to it later. It will show up in the diff between the old and new files and remind you of the details. O.k. But let me first to get more information about why using update- rc.d is failing. Camaleón wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) Just as a side suggestion, removing the package seems cleanest. But if you are worried then what I would do is to download the .deb and save it into a good place locally. I move copies of debs I want to cache from /var/cache/apt/archives/ to /root/system/ on my machine. Then you can safely remove the package. If as a risk management issue you found that you needed it to get networking up and running then you can install it from the local copy (without networking) and get networking up and online. And then of course at that time you could always update to any version that came later than your cached version by doing an online update. Uninstalling is not an option. I want to keep NM available and ready to be launched, just in case. OTOH, there are another packages I would like to keep installed but not started by default so I need to know the best (recommended way) to do it. Thanks for your comments, now I know editing script header is feasible and should be honored. Before going that path, I'm gonna make some attemps with update-rc.d. I'll keep you informed :-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.08.15.48...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
No one else has mentioned it: chmod a-x /etc/init.d/script-name Works for me :-) Cheers -- Joel Roth -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101208161158.ga6...@sprite
(Solved) Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, 07 Dec 2010 14:05:20 -0700, green wrote: Camaleón wrote at 2010-12-07 09:21 -0700: So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. You probably want to use disable instead of remove. See update-rc.d(8). Let's try it: r...@debian:~# update-rc.d network-manager disable update-rc.d: using dependency based boot sequencing insserv: warning: current start runlevel(s) (empty) of script `network- manager' overwrites defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `network-manager' overwrites defaults (0 1 6). r...@debian:~# ls -l /etc/rc* | grep network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 17:09 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 17:09 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 17:09 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 17:09 K01network-manager - ../init.d/network-manager lrwxrwxrwx 1 root root 25 dic 8 14:12 K01network-manager - ../init.d/network-manager Looks good, all scripts are Kaput as man page suggests :-) (rebooting...) t...@debian:~$ /etc/init.d/network-manager status could not access PID file for NetworkManager ... failed! This looks better :-D Now for The Final Probe... there is an update for NM I was holding for this momment, let's see what happens: r...@debian:~# LANG=en_US; apt-get update apt-get -V dist-upgrade (...) The following packages will be upgraded: (...) network-manager (0.8.1-4 = 0.8.1-5) (...) 39 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 38.9 MB of archives. After this operation, 4121 kB of additional disk space will be used. Do you want to continue [Y/n]? y (add here drum sounds...) Setting up network-manager (0.8.1-5) ... Reloading system message bus config...done. Stopping network connection manager: NetworkManager already stopped. insserv: warning: current start runlevel(s) (empty) of script `network- manager' overwrites defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `network-manager' overwrites defaults (0 1 6). (rebooting...) t...@debian:~$ /etc/init.d/network-manager status could not access PID file for NetworkManager ... failed! Oh, yes! I think you got it :-) There are some warnings when running the disable argument but after all it seems to do the job as expected. A _big thanks_ to all for the tips, really appreciated. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.08.16.46...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On 2010-12-07 17:21 +0100, Camaleón wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. You should use update-rc.d network-manager disable instead. See update-rc.d(8). Sven -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87tyiom5j0@turtle.gmx.de
Re: Feedback needed: How to disable services at startup... and keep them so.
On Wed, Dec 8, 2010 at 8:24 PM, Sven Joachim svenj...@gmx.de wrote: On 2010-12-07 17:21 +0100, Camaleón wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. You should use update-rc.d network-manager disable instead. See update-rc.d(8). I think update-rc.d manpage should then change example which Camaleon referenced in her solved post: Example of disabling a service: update-rc.d -f foobar remove update-rc.d foobar stop 20 2 3 4 5 . Should be Example of disabling a service: update-rc.d foobar disable Shouldn't be ? (Is it a bug in manpage?) All other tricks (exit 0, chmod, s/S/K/) are not the Debian Way ! Regards, -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktim4k7-gdc70wktjhnagzhs9qksxdw7ai__6r...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On 2010-12-08 23:41 +0100, Javier Barroso wrote: On Wed, Dec 8, 2010 at 8:24 PM, Sven Joachim svenj...@gmx.de wrote: You should use update-rc.d network-manager disable instead. See update-rc.d(8). I think update-rc.d manpage should then change example which Camaleon referenced in her solved post: Example of disabling a service: update-rc.d -f foobar remove update-rc.d foobar stop 20 2 3 4 5 . That does still work. Should be Example of disabling a service: update-rc.d foobar disable But this is better, yes. Please submit a bug against the sysv-rc package (severity minor). Sven -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/8739q7wixs@turtle.gmx.de
Re: Feedback needed: How to disable services at startup... and keep them so.
On Wed, Dec 08, 2010 at 08:24:51PM +0100, Sven Joachim wrote: On 2010-12-07 17:21 +0100, Camaleón wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. You should use update-rc.d network-manager disable instead. See update-rc.d(8). With that approach, how can you get a list of services that have been disabled using updated-rc.d? btw, I am curious that Debian now has several ways to enable/disable services. - installing/removing the package with apt-get - editing the /etc/default/servicename file - managing the symlinks with update-rc.d - the permissions of the /etc/init.d/servicename script Is this diversity intended to make systems easier to administer? (I guess it's okay after you learn about it.) Joel Sven -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87tyiom5j0@turtle.gmx.de -- Joel Roth -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101209075653.ga10...@sprite
Feedback needed: How to disable services at startup... and keep them so.
Hello, A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. A couple of days ago I lost network connectivity in that system (no Internet/local access because eth0 was not getting an IP from dhcp server, as used to). I had to restart the whole system in order to restore network connectivity (neither restarting networking service nor ifup/down eth0 had any positive effect). After a bit of digging, I realized that Network Manager service was running (!) again. I did not enable, so something happened which caused the service to be reengaged again. Looking into /var/log/apt/term.log I saw the following (sorry, the log is recorded in Spanish, hope is still clear): *** Log started: 2010-12-01 23:44:34 (...) Preparando para reemplazar network-manager 0.8.1-3 (usando .../network- manager_0.8.1-4_i386.deb) ... Desempaquetando el reemplazo de network-manager ... Preparando para reemplazar network-manager-gnome 0.8.1-1 (usando .../ network-manager-gnome_0.8.1-2_i386.deb) ... Desempaquetando el reemplazo de network-manager-gnome ... (...) Configurando network-manager (0.8.1-4) ... Reloading system message bus config...done. Stopping network connection manager: NetworkManager already stopped. Disabling interfaces configured with plain DHCP in /etc/network/ interfaces so that NetworkManager can take them over Auto interfaces found: lo eth0 iface to disable = eth0 Disabling interface: eth0 ... done. Starting network connection manager: NetworkManager. Configurando network-manager-gnome (0.8.1-2) ... *** Basically, the log says on December 1st there was an update for NM and a new package got installed (0.8.1-4). After that, even though NM service was expressly disabled, the update seems to re-enabled it again. Before I fill a bug report (I think a service that has been manually disabled should keep its state regardless any further update it can be applied afterwards), I would like to get some feedback... what do you think on this matter? I missed something -there is a better way to handle this or should I write a report? Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.07.16.21...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, Dec 7, 2010 at 10:21 AM, Camaleón noela...@gmail.com wrote: Hello, Hi A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. Seems like a good way to go. A couple of days ago I lost network connectivity in that system (no Internet/local access because eth0 was not getting an IP from dhcp server, as used to). I had to restart the whole system in order to restore network connectivity (neither restarting networking service nor ifup/down eth0 had any positive effect). After a bit of digging, I realized that Network Manager service was running (!) again. I did not enable, so something happened which caused the service to be reengaged again. Cool. Err... I mean, interesting. Looking into /var/log/apt/term.log I saw the following (sorry, the log is recorded in Spanish, hope is still clear): snip Basically, the log says on December 1st there was an update for NM and a new package got installed (0.8.1-4). After that, even though NM service was expressly disabled, the update seems to re-enabled it again. I don't read spanish, but my french is ok, and tha'ts what I would've guessed had happened Before I fill a bug report (I think a service that has been manually disabled should keep its state regardless any further update it can be applied afterwards), I would like to get some feedback... what do you think on this matter? I missed something -there is a better way to handle this or should I write a report? I'd definitely hold off on the bug report. I think you should look at the lsb headers of the network-manager script in /etc/init.d and change them to stop on all levels, start on none, then run insserv without any arguments to again disable network-manager. If this isn't a future proof method of disabling it then there is definitley a problem in that packages update maintenance scripts. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktikfzbnrwnppym2gm_k7j-mket_hhs5i6+tcm...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, 07 Dec 2010 10:51:11 -0600, Arthur Machlas wrote: On Tue, Dec 7, 2010 at 10:21 AM, Camaleón wrote: (...) Before I fill a bug report (I think a service that has been manually disabled should keep its state regardless any further update it can be applied afterwards), I would like to get some feedback... what do you think on this matter? I missed something -there is a better way to handle this or should I write a report? I'd definitely hold off on the bug report. I think you should look at the lsb headers of the network-manager script in /etc/init.d and change them to stop on all levels, start on none, then run insserv without any arguments to again disable network-manager. If this isn't a future proof method of disabling it then there is definitley a problem in that packages update maintenance scripts. Are you suggesting to manually edit the /etc/init.d/network-manager script header to fit my needs? Correct me if I'm wrong, but I expect this file (as any file located here) can be updated at any time and so replacing any of the customized values I can have written in there :-? I can try it though, just want to be sure this is not going to cause any problem in the future :-) Oh, and thanks both, Mike and you, for replying. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.07.19.35...@gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, Dec 7, 2010 at 1:35 PM, Camaleón noela...@gmail.com wrote: On Tue, 07 Dec 2010 10:51:11 -0600, Arthur Machlas wrote: On Tue, Dec 7, 2010 at 10:21 AM, Camaleón wrote: (...) Before I fill a bug report (I think a service that has been manually disabled should keep its state regardless any further update it can be applied afterwards), I would like to get some feedback... what do you think on this matter? I missed something -there is a better way to handle this or should I write a report? I'd definitely hold off on the bug report. I think you should look at the lsb headers of the network-manager script in /etc/init.d and change them to stop on all levels, start on none, then run insserv without any arguments to again disable network-manager. If this isn't a future proof method of disabling it then there is definitley a problem in that packages update maintenance scripts. Are you suggesting to manually edit the /etc/init.d/network-manager script header to fit my needs? Correct me if I'm wrong, but I expect this file (as any file located here) can be updated at any time and so replacing any of the customized values I can have written in there :-? Yes, that is what I am suggesting. And if the upgrade overwrites your changes, you should file a bug report and ask the maintainer to come into compliance with Debian Policy: The /etc/init.d scripts must be treated as configuration files, either (if they are present in the package, that is, in the .deb file) by marking them as conffiles, or, (if they do not exist in the .deb) by managing them correctly in the maintainer scripts (see Configuration files, Section 10.7). This is important since we want to give the local system administrator the chance to adapt the scripts to the local system, e.g., to disable a service without de-installing the package, or to specify some special command line options when starting a service, while making sure their changes aren't lost during the next package upgrade. [1] AND Configuration file handling must conform to the following behavior: - local changes must be preserved during a package upgrade, and - configuration files must be preserved when the package is removed, and only deleted when the package is purged. [2] Best, AM [1] http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit [2] http://www.debian.org/doc/debian-policy/ch-files.html#s-config-files I can try it though, just want to be sure this is not going to cause any problem in the future :-) Oh, and thanks both, Mike and you, for replying. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.12.07.19.35...@gmail.com -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktin-kd7zswhhutunt1cypxtxt1q=uee_xc+ws...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
Camaleón wrote at 2010-12-07 09:21 -0700: So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. You probably want to use disable instead of remove. See update-rc.d(8). signature.asc Description: Digital signature
Re: Feedback needed: How to disable services at startup... and keep them so.
Arthur Machlas wrote: Camaleón wrote: Are you suggesting to manually edit the /etc/init.d/network-manager script header to fit my needs? Correct me if I'm wrong, but I expect this file (as any file located here) can be updated at any time and so replacing any of the customized values I can have written in there :-? Yes, that is what I am suggesting. And if the upgrade overwrites your changes, you should file a bug report and ask the maintainer to come into compliance with Debian Policy: Let me confirm this. I have done this many times. You are allowed local modification of /etc/init.d/ scripts. (Postfix with SASL requires it.) When a new package is installed it will be handled as a conffile. That is to say that interface will be to ask you (if interactive) whether you want to install the new or keep the old with the default being to keep the old. The files will be saved with a .dpkg-old or .dpkg-new extension as appropriate if you want to merge changes in later. Since the default is to keep your installed and modified file this can never be changed automatically to start the new file. Therefore a very simple way to prevent a service from running is to edit the /etc/init.d/ script and put an 'exit 0' as the second line of the script. Do your self a favor and place a comment there for you to read when you come back to it later. It will show up in the diff between the old and new files and remind you of the details. Camaleón wrote: A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) Just as a side suggestion, removing the package seems cleanest. But if you are worried then what I would do is to download the .deb and save it into a good place locally. I move copies of debs I want to cache from /var/cache/apt/archives/ to /root/system/ on my machine. Then you can safely remove the package. If as a risk management issue you found that you needed it to get networking up and running then you can install it from the local copy (without networking) and get networking up and online. And then of course at that time you could always update to any version that came later than your cached version by doing an online update. Bob signature.asc Description: Digital signature
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, Dec 07, 2010 at 04:21:38PM +, Camale?n wrote: Hello, A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. Open the update-rc.d manpage, search for 'disable' and it says: == A common system administration error is to delete the links with the thought that this will disable the service, i.e., that this will prevent the service from being started. However, if all links have been deleted then the next time the package is upgraded, the package¿s postinst script will run update-rc.d again and this will reinstall links at their factory default locations. The correct way to disable services is to configure the service as stopped in all runlevels in which it is started by default. In the System V init system this means renaming the service¿s symbolic links from S to K. == You didn't disable network-manager. You removed the startup scripts which were correctly put back by the update. Of course I only know this by being bitten by it several times in the past ;-) Regards, Jochem -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101207224653.ga11...@jkossen.nl
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, Dec 7, 2010 at 10:21 AM, Camaleón noela...@gmail.com wrote: Hello, A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. I missed something -there is a better way to handle this or should I write a report? Greetings, -- Camaleón AFAIK, the method to disable a boot time service is to change the name of its symlink in the appropriate runlevel (normally 2, for debian) folder. I'm not sure what the name of the NM script is as I did this many moons ago. But, if you look in /etc/rc2.d/, you will find a README that explains it all. Reprinted here for clarity: The scripts in this directory are executed each time the system enters this runlevel. The scripts are all symbolic links whose targets are located in /etc/init.d/ . To disable a service in this runlevel, rename its script in this directory so that the new name begins with a 'K' and a two-digit number, where the number is the difference between the two-digit number following the 'S' in its current name, and 100. To re-enable the service, rename the script back to its original name beginning with 'S'. For a more information see /etc/init.d/README. -- Paul Lane KC9EYE - Water which is too pure has no fish. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktimjcf9nxa0etbyp6v_eimyyk1uaaeousrj2f...@mail.gmail.com
Re: Feedback needed: How to disable services at startup... and keep them so.
On Tue, Dec 7, 2010 at 6:16 PM, Paul Lane kc9...@gmail.com wrote: On Tue, Dec 7, 2010 at 10:21 AM, Camaleón noela...@gmail.com wrote: Hello, A month ago, I disabled Network Manager service in my Squeeze system so it doesn't run on start up. I wanted to keep NM installed (just in case) but preferred to use the old ifup network setup method. So I issued update-rc.d network-manager remove and also disabled gnome NM applet from being started. So far so good, no more NM running at booting. I missed something -there is a better way to handle this or should I write a report? Greetings, -- Camaleón AFAIK, the method to disable a boot time service is to change the name of its symlink in the appropriate runlevel (normally 2, for debian) folder. I'm not sure what the name of the NM script is as I did this many moons ago. But, if you look in /etc/rc2.d/, you will find a README that explains it all. Reprinted here for clarity: The scripts in this directory are executed each time the system enters this runlevel. The scripts are all symbolic links whose targets are located in /etc/init.d/ . To disable a service in this runlevel, rename its script in this directory so that the new name begins with a 'K' and a two-digit number, where the number is the difference between the two-digit number following the 'S' in its current name, and 100. To re-enable the service, rename the script back to its original name beginning with 'S'. For a more information see /etc/init.d/README. Problem is, or at least, what I think the problem with that is, is that insserv is installed by default, and concurrent is now the default as well. So whenever a system service is added removed, changed or when insserv is called by some other means, it will look at the LSB headers for the init script and fix any missing symlinks. Haven't tested that, but it's my uninformed opinion. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktik6szwjx+qfnxm5vqyic2fu=y9phhbejf1x7...@mail.gmail.com