Weblog entry #12 for Utumno
The annoyance: every time I 'apt-get upgrade' the system and a given service gets upgraded, it adds itself back to the initscripts. Anyone knows how to prevent that?
Comments on this Entry
[ Send Message | View Steve's Scratchpad | View Weblogs ]
[ Parent | Reply to this comment ]
[ Send Message | View Utumno's Scratchpad | View Weblogs ]
[ Parent | Reply to this comment ]
[ Send Message | View Utumno's Scratchpad | View Weblogs ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Send Message | View Utumno's Scratchpad | View Weblogs ]
The reason I do not want to have Samba started at bootup is that the laptop we are talking about is typically run in two places ( my office and my house ) and in my house I do not need nor want to run it. The network there is very hostile and filled up to the brim with script-kiddies - after a week of running samba there ( accidental, that was after an 'apt-get upgrade' and my failure to notice that this re-adds samba to initscripts ) my /var/log/samba/* directory was over 100 MB of breakin attempt logs.
So I had to write a script which first detects where I am and only if I am in the office it brings samba up with a '/etc/init.d/samba start'. So no, a 'chmod -x' wont do.
[ Parent | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
Surely in that situation you're fine:
- The bootup script is non-executable.
- You run your "where am I script" which either:
- 1. Identifies it needs to start samba and runs "chmod +x ; start; chmod -x"
- 2. Realises nothing needs to happen so does nothing.
The only extra complication I see is that once you've identified that you need to enable Samba you must start it, but remove the -x permission so that at reboot time it doesn't come back up unless your identification script detects that this is required.
[ Parent | Reply to this comment ]
[ Send Message | View Utumno's Scratchpad | View Weblogs ]
I guess the real question is the following: why is that an upgrade re-adds a service to initscripts anyway? Seems like if a service is installed, and if the default behavior is to start it on bootup *but* during the upgrade it turns out this service is currently set *not* to be started on bootup , it can only mean one thing: the administrator of this machine must have update-rc.d remove'd it, and he must have done it on purpose. So why the forceful override of administrator's choice?
[ Parent | Reply to this comment ]
sh /etc/init.d/<service-name> start
?
That should work for those services that you want to start manually -- if you go with the non-executable scheme that is.
Cheers.
[ Parent | Reply to this comment ]
# update-rc.d samba stop 0 1 2 3 4 5 6 .
[ Parent | Reply to this comment ]
[ Send Message | View Utumno's Scratchpad | View Weblogs ]
[ Parent | Reply to this comment ]
phil
[ Parent | Reply to this comment ]
[ Send Message | View Utumno's Scratchpad | View Weblogs ]
[ Parent | Reply to this comment ]