summaryrefslogtreecommitdiff
blob: 5dc05d456cd99aab88a519c72c4849a0bcb413cf (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
#!/bin/sh
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/gentoo-ifplugd.action-v2,v 1.2 2004/05/18 15:15:14 mholzer Exp $
#
# Gentoo-specific ifplugd.action
#
# This file gets called by ifplugd when it wants to bring an interface
# up or down.
#

case "$2" in
	up)
		state=start
		;;
	down)
		state=stop
		;;
	*)
		echo "$0: wrong arguments"
		echo "Call with <interface> <up|down>"
		exit 1
		;;
esac

if [ -x /etc/init.d/net.$1 ]
then
	/etc/init.d/net.$1 --quiet $state
	exit 0
else
	logger -t ifplugd.action "Error: Couldn't configure $1, no /etc/init.d/net.$1 script!"
	exit 1
fi