DragonFly BSD
DragonFly users List (threaded) for 2006-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: shutdown on BSD and Linux


From: nospam@xxxxxxxxxxxxx (Jamie)
Date: 07 Sep 2006 18:25:10 GMT

In <44fffa27$0$789$415eb37d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Oliver Fromme <check+j57sbr00rs54722k@xxxxxxxxxx> mentions:
> > So what's up?  Is BSD-style shutdown dangerous, or are the Linux
> > people stupid?
>
>Neither nor.
>
>BSD and Linux have very different init/rc implmentations.
>Linux has a SysV-style runlevel implementation (similar to
>Solaris), which means that certain scripts get executed
>whenever the system enters a different runlevel.  A shut-
>down is a separate runlevel, too, so it executes scripts to
>cleanly shutdown daemons etc.  In Linux, every little fart
>has its own script with a considerable overhead, and they
>are quite verbose.

One nice thing about linux is that you have so many to choose 
from. :-) I put together my own linux distro once, based 
heavily on the documentation from "linux from scratch".

When it came time to do the init scripts, I opted to borrow
some of what I felt were the better ideas from slackware
rather than use any of the suggestions.

The result was a super fast booting process and a fairly
fast shutdown process. (I inserted some checks and did
a sleep for a sizable amount of time after giving everything
a kill signal but just prior to a kill -9 and did some paranoid
sanity checks, this slows things down)

>The BSD world traditionally doesn't have such a system of
>runlevels.  Nevertheless, when you use shutdown(8), scripts
>from /usr/local/etc/rc.d/* are executed with an argument of
>"stop" (DragonFly has inherited that feature from FreeBSD).
>
>Meanwhile, FreeBSD has implemented a system called "rcNG"
>which also seperates out most parts of the traditional BSD-
>style /etc/rc into many small start/stop scripts in the
>/etc/rc.d directory.  DF has also taken that from FreeBSD.

Problem with this whole "init system" in everything I've ever
seen is that it tries to do too much. You end up spending 1/2
hour reading through docs and comprehending grep output, editing
incorrect files, etc.. just to figure out what flags were used
to start a given service.

I've been known to go through init systems with a chainsaw, hacking
out pretty much everything that I don't feel needs to be there.

Haven't done that *yet* with dragonfly, but I probably will some
day. (if I can ever get a computer that stays running long enough..)

My solution was to set up a system so simple, you can practically
follow it from rc to the end, no need for documentation even.
the scripts themselves could just as well be the docs, and
you can find whatever it is you want with grep. This would
obviously not work for most people, but I like it that way.

Jamie
-- 
http://www.geniegate.com                    Custom web programming
guhzo_42@xxxxxxxxx (rot13)                User Management Solutions



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