Re: Making SysV boot scripts reboot faster
On Sat, Jan 17, 2004 at 04:41:35AM -0400, Peter Cordes wrote:
>
> I always find it dumb that rebooting a GNU system involves doing so much
> stuff, when the machine is going to be rebooted anyway. e.g. why
> deconfigure the network interfaces? It's not even getting saved, it's just
> volatile system state that will be destroyed by the reset.
>
> For a reboot, all you need to do is save anything that's needed, and close
> any files that are open for writing.
Consider that some kinds of network interfaces (such as those configured
with DHCP) are associated with a file open for writing on the filesystem.
> You don't have to bring the system to the exact state it was in at bootup,
> or anything. Then you can unmount your filesystems to make sure they're
> in sync (including network mounts), and reboot. Some daemons that only
> log to syslog don't even need to be stopped, since they won't have any
> files open for writing. Scripts like alsa will just save mixer settings
> on reboot, and only unload the modules on stop.
All daemons need to be given a chance to shut down gracefully; you don't
know what kind of internal state they are maintaining. A daemon which only
writes to syslog isn't very useful; most of them provide other services
besides logging.
> I do think it would be good to have some mechanism, maybe a magic comment
> in the file that update-rc.d looks for when setting up the symlinks.
>
> It's annoying to have init scripts which you've removed the symlinks for,
> and you don't know where to put them back. (was this S10 or S35?...) A
> format for comments that update-rc.d could read would be nice in general,
> and could be used for my purpose too.
I hate magic comments. If information like this were needed, it would
belong in a configuration file.
--
- mdz
Reply to: