[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Some ideas about the Debian Runlevel System



Craig Dickson <crdic@pacbell.net> wrote:
[...]
> If I install a package like, say, samba, it will set itself up to run in
> runlevels 2-5. If I decide that I want runlevel 2 to be "no network",
> then what is the recommended Debian way to enforce this?

Remove the symlink in runlevel 2 (and optionally add a kill link
instead).

> If I just
> remove the symlink /etc/rc2.d/S20samba, will it reappear the next time I
> upgrade samba?

No, because the package will simply call "update-rc.d samba defaults"
on upgrade:
| If any files /etc/rcrunlevel.d/[SK]??name already exist then
| update-rc.d does nothing. This is so that the system administrator
| can rearrange the links, provided that they leave at least one link
| remaining, without having their configuration overwritten.

> Will it reappear if I remove samba and then reinstall it?

The symlinks are handled similar to configuration files, they are only
removed if you *purge* the package. After
"dpkg --remove samba && apt-get install samba" you would still have
no S-link in runlevel 2.

See policy 10.3.3.

> I'm hoping that either there is another mechanism for defining runlevels
> than just deleting symlinks, or that deleted symlinks won't reappear on
> upgrades. They probably should reappear after a removal/reinstall of the
> package, I suppose.

I'd really suggest using file-rc anyway, editing a file is more handy
than setting/generating symlinks and it behaves the same way in every
other respect.
                 hth, cu andreas



Reply to: