You are not logged in.

#1 2004-12-11 12:39:30

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 249

/etc/rc.multi - idea

Oryginal file is:

#!/bin/sh
#
# /etc/rc.multi
#

. /etc/rc.conf
. /etc/rc.d/functions
# Start daemons
for daemon in "${DAEMONS[@]}"; do
        if [[ `echo $daemon | grep '^[^!]' | wc -l` -eq 1 ]]; then
                /etc/rc.d/$daemon start
        fi
done

if [ -x /etc/rc.local ]; then
        /etc/rc.local
fi

# End of file

But I think it is wrong way. It should be:

#!/bin/sh
#
# /etc/rc.multi
#

. /etc/rc.conf
. /etc/rc.d/functions

if [ -x /etc/rc.local ]; then
        /etc/rc.local
fi


# Start daemons
for daemon in "${DAEMONS[@]}"; do
        if [[ `echo $daemon | grep '^[^!]' | wc -l` -eq 1 ]]; then
                /etc/rc.d/$daemon start
        fi
done

# End of file

Why? Take a look at this example:

/etc/rc.conf includes modprobe lirc_gpio, rc.multi will start lircd. Of course when you use oryginal rc.multi, lircd won't load, because module lirc_gpio isn't loaded!


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

#2 2004-12-12 04:02:07

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: /etc/rc.multi - idea

Shouldn't you be loading lirc_gpio in the MODULES variable in rc.conf?

I assume that /etc/rc.conf is actually a typo and you meant to say /etc/rc.local.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

Board footer

Powered by FluxBB