Subject: Re: The new rc.d stuff...
To: None <>
From: Christos Zoulas <>
List: current-users
Date: 04/06/2000 12:46:57
In article <>,
Secret Asian Man <> wrote:
> What kind of argument is this? If your system screws up, there's always
> single user mode. Frankly, I'm tired of all these systems of initalization
> that think modularity and abstraction are ways of achieving godliness,
> because they aren't. Sure, isn't it fun to start and stop processes using
> cute little scripts? But don't we have pid files?

Ok, lemme see... I want to restart amd:

    kill `cat /var/run/`

Lemme do a few ps's to make sure it is dead. Ok, it died finally.
So far so good. Now I need to find out how to start it:

    grep amd /etc/*rc*

Oops, that picked bootparamd too, I'll spare you the output:

    grep amd /etc/*rc* | grep -v bootparamd

/etc/rc:if [ "$amd_flags" != NO ] && [ -d "$amd_dir" -a -r "$amd_master" ]; then
/etc/rc:        if [ "$amd_flags" = DEFAULT ]; then
/etc/rc:                amd_flags="-l syslog -x error,noinfo,nostats"
/etc/rc:        echo -n ' amd'
/etc/rc:        amd $amd_flags -p -a $amd_dir `cat $amd_master` > /var/run/
/etc/rc.conf:amd_flags="-r -l syslog"   # default: "-l syslog -x error,noinfo,nostats"
/etc/rc.conf:amd_dir=/net                       # AMD's mount directory
/etc/rc.conf:amd_master=/etc/amd/master # AMD 'master' map

Cool, now I can type:
    amd -r -l syslog -p -a /net `cat /etc/amd/master` > /var/run/

Great, I see your point. The above is much easier and less error prone
than typing:

    /etc/rc.d/amd restart