-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello again,

I did not solve the problem at all, the error occurs from time to time again.

Again, here's what I did: I added "provide = virtual/dhcp 
virtual/dhcp/${NAME};" to daemon/dhcpcd.i; and I added "use = 
virtual/dhcp/${NAME};" to net/net.i. As I understand InitNG's dependency 
system, "use" says: Start it if it is to be started anyways, which means, 
that if I ran "ng-update add daemon/dhcpcd/eth0 default" previously, this 
would be executed before net/eth0, correct? I can, btw, not add 
virtual/dhcp/eth0, I need to add "daemon/dhcpcd/eth0".

So, because system/netmount.i needs virtual/net (which is provided by 
net/net.i), InitNG should first execute net/eth0, find that net/eth0 uses 
virtual/dhcp/eth0 (provided by daemon/dhcpcd.i), and therefore start 
daemon/dhcpcd/eth0 prior to net/eth0 and prior to system/netmount?

I will attach the two .i files (which I had to modify to meet my environment) 
to make clear what I am trying to say.

I also get some warnings right after /sbin/initng is called by the kernel. The 
say "service "daemon/portmap" needs service "virtual/net", that could not be 
found!" But "virtual/net" is provided by net/net.i, which is correctly added 
to the default runlevel as net/eth0!

Please have a look at it. Any help is highly appreciated.

- --------------------------------------------------------
daemon daemon/dhcpcd/* {
    need = system/bootmisc;
    use = system/modules system/coldplug;
    provide = virtual/dhcp virtual/dhcp/${NAME};
    pid_file = /etc/dhcpc/dhcpcd-${NAME}.pid;
    forks;
    respawn;
    daemon_stops_badly;
    script daemon = {
        opts=

        # Get options
        optsdir="/etc/conf.d/net/${NAME}/dhcpcd"
        [ -e "$optsdir/nodns" ] && opts="$opts -R"
        [ -e "$optsdir/nontp" ] && opts="$opts -N"
        [ -e "$optsdir/nonis" ] && opts="$opts -Y"

        # Make sure we do not get an infinite lease
        echo "${opts}" | /bin/grep -w -- '-l' > /dev/null || opts="${opts} -l 
86400"

        hostname=$(hostname)
        if [ -n "${hostname}" -a ! "${hostname}" = "(none)" -a ! "${hostname}" 
= "localhost" ]
        then
            echo "${opts}" | /bin/grep -w -- '-h' || opts="${opts} -h 
${hostname}"
        fi
        exec /sbin/dhcpcd ${opts} ${NAME}
    };
}
- --------------------------------------------------------
service net/* {
    stdall = /dev/null;
    need = system/bootmisc;
    use = system/modules system/coldplug daemon/cardmgr virtual/dhcp/${NAME};
    provide = virtual/net virtual/net/${NAME};
    script start = {
        # Put up the interface
        [ -d "/etc/conf.d/net/${NAME}" ] || exit 1

        # Check if this interface should be configured via DHCP
        [ -d "/etc/conf.d/net/${NAME}/dhcpcd" ] && exit 0

        IPv4_ADDR=$(< /etc/conf.d/net/${NAME}/ipv4_addr)
        IPv4_NETMASK=$(< /etc/conf.d/net/${NAME}/ipv4_netmask)
        IPv4_BROADCAST=$(< /etc/conf.d/net/${NAME}/ipv4_broadcast)
        /sbin/ifconfig ${NAME} ${IPv4_ADDR} netmask ${IPv4_NETMASK} broadcast 
${IPv4_BROADCAST}

        # Check so its up
        /sbin/ifconfig ${NAME} | /bin/grep -qe "inet addr" -e "inet6 addr" || 
exit 1
        exit 0
    };
    script stop = {
        set -e

        if [ -d "/etc/conf.d/net/${NAME}/dhcpcd" ]
        then
            /sbin/dhcpcd -k ${NAME}
        fi
        /sbin/ifconfig ${NAME} down

        exit 0
    };
}
- --------------------------------------------------------

Thanks in advance.

        EMSPV

- ------ Original Message ------
Sender: Ismael Luceno <[EMAIL PROTECTED]>
Recipient: [email protected]
Date: Friday 21 July 2006 21:18
Subject: Re: [Initng] Network/DHCP and InitNG

>The solution is correct, but the dhcp daemon should be started by initng and
>not by the scripts.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEwU/6MpEdE19y46cRAlG5AJ0SGHj6jFvaaxuZEeJyK0ZrW2XoxACgg+o1
+UpV4o6hN+lqK+iawlkvGU4=
=3AZ9
-----END PGP SIGNATURE-----
-- 
_______________________________________________
Initng mailing list
[email protected]
http://jw.dyndns.org/mailman/listinfo/initng

Reply via email to