diff options
Diffstat (limited to 'sys-apps/ifplugd/files/ifplugd.action')
-rw-r--r-- | sys-apps/ifplugd/files/ifplugd.action | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-apps/ifplugd/files/ifplugd.action b/sys-apps/ifplugd/files/ifplugd.action new file mode 100644 index 000000000000..80d961e0648a --- /dev/null +++ b/sys-apps/ifplugd/files/ifplugd.action @@ -0,0 +1,29 @@ +#!/bin/sh +# +# This file is part of ifplugd, and adapted for use in Gentoo Linux. +# +# 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" ] && /etc/init.d/net.$1 start > /dev/null +[ "$2" = "down" ] && /etc/init.d/net.$1 stop > /dev/null + +exit 0 |