CRUX : Home

Home :: Documentation :: Download :: Development :: Community :: Wiki :: Ports :: Bugs :: Links :: About

Back to wiki start page

Categories: Network

AutoNet

Steve Starr

How i setup my /etc/rc.d/net file.

Instructions

I have never truely understood how to properly set up the /etc/rc.d/net file so i just

set it up like this.
#!/bin/sh
#
# /etc/rc.d/net: start/stop network
#

case $1 in
start)
        dhcpcd ath0
	;;
stop)
        dhcpcd -k ath0
	;;
restart)
	$0 stop
	$0 start
	;;
*)
	echo "usage: $0 [start|stop|restart]"
	;;
esac

# End of file

Now this setup is for a wifi card but you could replace ath0 with eth0 or what ever and

it should work fine.