On Thu, Apr 15, 2004, David M. Fetter wrote:
> On Thu, 2004-04-15 at 10:47, Ralf S. Engelschall wrote:
> > Under OpenPKG 2.0 (and a not too out-dated OpenPKG CURRENT) just place
> > into <prefix>/etc/rc.conf the entry "openpkg_rc_def=no" and all your
> > services will be disabled by default. For older OpenPKG releases there
> > is no such convenient way and you have to disable all services manually
> > by adding "<package>_enable=no" into rc.conf.
>
> Hmmm. I tried this but the S99usrlocal system rc script still launches
> everything under the sun. I have exactly the following at the end of my
> rc.conf file:
>
> openpkg_rc_def=no
> dhcpd_enable=yes
>
> Therefore, if I'm understanding this correctly, only dhcpd should start
> on boot, right? That's not what is happening. Am I doing this wrong?
Hmmm.. you are using OpenPKG 2.0, right?
I see the following:
| # /usr/opkg/etc/rc --print dhcpd start
| . /usr/opkg/etc/rc.func
| openpkg_rc_def="yes"
| openpkg_rc_all="$openpkg_rc_def"
| openpkg_enable="$openpkg_rc_def"
| openpkg_envprio="high"
|
| . /usr/opkg/etc/rc.conf
| amd_enable="$openpkg_rc_def"
| amd_log_prolog="true"
| amd_log_epilog="true"
| [...]
| dhcpd_enable="$openpkg_rc_def"
| dhcpd_flags="-q"
| [...]
| . /usr/opkg/etc/rc.conf
| dhcpd_pidfile="/usr/opkg/var/dhcpd/dhcpd.pid"
| dhcpd_signal () {
| [ -f $dhcpd_pidfile ] && kill -$1 `cat $dhcpd_pidfile`
| }
|
| rcService dhcpd enable yes || exit 0
| rcService dhcpd usable no && exit 0
| rcService dhcpd active yes && exit 0
| flags="$dhcpd_flags"
| echo $flags | grep -- -p >/dev/null
| if [ $? -ne 0 -a ".$dhcpd_port" != . ]; then
| flags="$flags -p $dhcpd_port"
| fi
| /usr/opkg/sbin/dhcpd $flags $dhcpd_if >/dev/null 2>&1
As you can see, openpkg_rc_def is initialized to "yes", then your
rc.conf sets it to "no", then things like amd_enable and dhcp_enable
become "no" and then your rc.conf overrides dhcpd_enable to "yes". Use
this --print debugging yourself and try to find out where the difference
is for you, please.
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List [EMAIL PROTECTED]