Jimmy Wu wrote: > Thanks for the detailed email and the advice about service vs > invoke-rc.d - I should probably spend more time figuring out what the
The win for package postinst scripts using invoke-rc to start services is that if they are installed in a chroot then maybe they shouldn't start services. I use chroots for many things and I don't want them starting conflicting daemons for example. So I set up a policy-rc.d script that instructs the chroot not to start any daemons. The invoke-rc.d script is coded to respect the policy-rc.d and will do the right thing in that case. But for a human at the command line if they ask for a daemon to start then pretty much they really want the deamon to start. The problem is that humans usually have personal environment variables set from their bashrc file. Things like PATH and other things can divert a system daemon from doing the right thing. So the service command cleans the environment first. A specialized 'env -i' flavor just for starting system daemons. Other distros have had this for a while and it is a good thing that Debian now has it too. Life is more uniform across distros for this one little thing. > proper tools for configuring runlevels are. When I was messing with them > manually, I also tried using sysv-rc-conf, update-rc.d, and insserv, so > you can probably tell I really had no idea what I was doing ;). So... I am curious. I often read that people are wanting to "configure their runlevels". You are not the only one. Other people talk about it too. But I never know why. And I never quite know exactly what someone means when they want to "configure runlevels". The only two runlevels I ever use are multiuser (Debian uses runlevel 2, the default for multiuser) and single user (run level 1). In the old days when networking was new and exciting there was runlevel 3 for enabling networking, NFS, and YP. If you didn't want networking then you booted to runlevel 2. If you did then you used runlevel 3. Then graphical logins came into being and it was just natural to turn on graphical logins in runlevel 4. If you didn't want a graphical login then you booted to runlevel 3 (or 2) instead. But here it is all of these years later and now I just really don't usually want to boot into a system without networking enabled. And if I do want networking disabled then I can easily bring the networking offline without needing to change runlevels. So having networking enabled in runlevel 2 multiuser mode is perfectly fine for me. And if I don't want to log into a graphical display manager (gdm, kdm, xdm) then I switch to console with Control-Alt-F1 and log in on the text console. So no need to avoid what was previously runlevel 4 for a graphical display manager. (Of course in Debian all runlevels are the same by default.) And so I am left wondering what people are trying to accomplish when they "configure runlevels". Is there really a need to avoid the graphical display manager by changing runlevels? Is there really a need to boot without networking enabled? Probably not. So I assume there must be some other behavior that people are wanting and it is completely a mystery to me. > I'll look more into this over the weekend and hopefully post back with a > success story. Good luck! Bob
signature.asc
Description: Digital signature