Bruce Dubbs wrote:
> Dave wrote:
> 
>> I don't have dhcp or dhcpcd installed, but I can start the network with
>> "network start".
>>
>> What actually calls the script /etc/init.d/network start on initial
>> boot? I suspect dhcp... does it.
> 
> It is started by the rc script.
> 
> The first process the the kernel runs is /bin/init.  It uses 
> /etc/inittab to decide what to do.  Assuming run level 3, that runs:
> 
> /etc/rc.d/init.d/rc S
> /etc/rc.d/init.d/rc 3
> 
> This then executes all the 'S' scripts in /etc/rc.d/rcS.d/ and 
> /etc/rc.d/rc3.d/.
> 
> We have /etc/rc.d/rc3.d/S20network that starts up the network.  It looks 
> for files in /etc/sysconfig/ifconfig.* and uses those to run /sbin/ifup 
> to bring up individual interfaces.
> 
> For dhcp, you need something like:
> 
> cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
> ONBOOT="yes"
> IFACE="eth0"
> SERVICE="dhcpcd"
> DHCP_START="-b -q <insert appropriate start options here>"
> DHCP_STOP="-k <insert additional stop options here>"
> EOF
> 
> As documented in BLFS.
> 
> The setup for static IP addresses is documented in LFS.
> 
>    -- Bruce


unfortunately the LFS docs assume if you have wifi then you have wired.
They only covered Dynamic addressing. I only have WEP security access 
here. WGET works, that's why I stopped there.
They seem the skip the "no-wired & Wifi" option, This system, (not a 
laptop), will have limited dedicated use.  (audio vinyl to mp3)


Even though I have to initiate the  network with an iwconfig wlan0 essid 
  ---  enc ---), and then ifup wlan0.   It does start the network that way
As for the "/etc/sysconfig/ifconfig.*" It wouldn't acknowledge the file
was there,(ifconfig.wlan0).

  I modified the /etc/init.d/network.
-----------
case "${1}" in
    start)
       # Start all network interfaces
#      for file in /etc/sysconfig/ifconfig.*
#      do
#         interface=${file##*/ifconfig.}
#
#         # Skip if $file is * (because nothing was found)
#         if [ "${interface}" = "*" ]
#         then
#            continue
#         fi
#
#         /sbin/ifup ${interface}
#      done
         /usr/sbin/iwconfig wlan0 essid AUBE enc 9897271076
#
         /sbin/ifup wlan0
           ;;

---------
I did similar for the stop command.    Now I can issue 'network start' 
and the network starts as expected.  I can ping and wget without dhcp,
ntpdate,samba and ssh work without it. which makes me ask "Is dhcp 
necessary on a machine with a static IP that
only uses the one access point.

Where would I insert a 'network start' command without having to log
in? (headless, I believe they call it).

looks like dhcp was starting the network thru the boot script. But with 
your name all over the scripts, I gotta listen to ya.
Now back to that rc script.

Dave
 

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to