summaryrefslogtreecommitdiffstats
path: root/target/device/valka/target_skeleton/etc/rc.d/10.network
blob: ebe092a0ef822b5742e11443c9137a9e5b22179a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/ash
. /etc/rc.subr

start() {
	echo -n " * Network interfaces: "
	if checkyesno ${eth0_enable}; then
		if ${ifup_program} eth0 > /dev/null 2>&1; then
			echo -n "eth0 "
		else
			echo -n "eth0=failed "
		fi
	fi
	if checkyesno ${eth1_enable}; then
		if ${ifup_program} eth1 > /dev/null 2>&1; then
			echo -n "eth1"
		else
			echo -n "eth1=failed"
		fi
	fi
	echo ""
}

stop() {
	echo -n " * Stopping network interfaces: "
	if ${ifdown_program} -fa > /dev/null 2>&1; then
		echo "Ok"
	else
		echo "Failed"
	fi
}

rc_run_command "$1"