[Clfs-support] Embedded X86 Bootscripts NETWORKING=no

John john at hf-teknik.nu
Mon Feb 25 10:27:29 PST 2008


CLFS Embedded 
Chapter 10
10.9.1


In this bootscript I chose NETWORKING=no

In order to cut down on problems.
But all that happens is that it stops booting and tells me 
I did not choose NETWORKING=yes

"Networking is disabled in /etc/network.conf"

I have been trying without success to modify the script.

Anyone know the correct way to disable networking?

I have pasted the script below.



John



#!/bin/ash

#

# Network interface(s) init script

#

# config: /etc/network.conf

# /etc/network.d/interface.[devname]

. /etc/rc.d/init.d/functions

. /etc/network.conf

if [ "$NETWORKING" != "yes" ]; then

echo "Networking is disabled in /etc/network.conf"

exit 0

fi

case "$1" in

start)

for i in /etc/network.d/interface.*

do

if [ -r "$i" ]; then

. $i

if [ "$DHCP" = "yes" ]; then

echo -n "Starting DHCP for interface $INTERFACE: "

udhcpc -b -i "$INTERFACE" \

-p "/var/run/udhcpc.$INTERFACE.pid" \

> /dev/null

else

echo -n "Setting up interface $INTERFACE: "

ifconfig "$INTERFACE" "$IPADDRESS" \

netmask "$NETMASK" \

broadcast "$BROADCAST" up

fi

check_status

fi

done


if [ "$USE_GATEWAY" = "yes" -a -n "$GATEWAY" ]; then

echo -n "Setting default route: "

route add default gw $GATEWAY

check_status

fi

;;

stop)

if [ "$USE_GATEWAY" = "yes" -a -n "$GATEWAY" ]; then

echo -n "Removing default route: "

route del -net 0.0.0.0

check_status

fi

for i in /etc/network.d/interface.*

do

if [ -r "$i" ]; then

. $i

echo -n "Shutting down interface $INTERFACE: "

ifconfig $INTERFACE down

check_status

if [ "$DHCP" = "yes" ]; then

kill `cat "/var/run/udhcpc.$INTERFACE.pid"`

sleep 1

fi

fi

done

;;

restart)

$0 stop

$0 start

;;

status)

ifconfig

route

;;

*)

echo "Usage: $0 {start|stop|restart|status}"

exit 1

esac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20080225/7310eb35/attachment.html>


More information about the Clfs-support mailing list