From dadd1323eb57cc605760441fed3b69614cf498b7 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 3 Oct 2017 16:00:14 -0500 Subject: Add ifplugd feature to mlinux --- recipes-core/busybox/files/ifplugd.action | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 recipes-core/busybox/files/ifplugd.action (limited to 'recipes-core/busybox/files/ifplugd.action') diff --git a/recipes-core/busybox/files/ifplugd.action b/recipes-core/busybox/files/ifplugd.action new file mode 100755 index 0000000..e7184c7 --- /dev/null +++ b/recipes-core/busybox/files/ifplugd.action @@ -0,0 +1,30 @@ +#!/bin/sh +# $Id: ifplugd.action 99 2004-02-08 20:17:59Z lennart $ + +# This file is part of ifplugd. +# +# ifplugd is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# ifplugd is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with ifplugd; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +set -e + +if [ -z "$1" ] || [ -z "$2" ] ; then + echo "Wrong arguments" > /dev/stderr + exit 1 +fi + +[ "$2" = "up" ] && exec /sbin/ifup $1 +[ "$2" = "down" ] && exec /sbin/ifdown $1 + +exit 0 -- cgit v1.2.3