summaryrefslogtreecommitdiffstats
path: root/src.etc/init.d/networking
blob: 66967f9299176bb29afdc84bfdbe1c21beb13540 (plain)
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
33
34
35
36
37
38
39
40
#!/bin/sh

start()
{
	printf 'Configuring network interfaces... '
	ifdown -a >/dev/null 2>&1
	ifup -a
	printf 'done.\n'
}

stop()
{
	printf 'Deconfiguring network interfaces... '
	ifdown -a
	printf 'done.\n'
}

restart()
{
	printf 'Reconfiguring network interfaces... '
	ifdown -a
	ifup -a
	printf 'done.\n'
}

case "${1}" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		restart
		;;
	*)
		printf 'Usage: %s {start|stop|restart}\n' "${0}" >&2
		exit 1
		;;
esac