Blame ifplugd_action-readability.patch

e096487
improve readability of ifplugd.action
e096487
e096487
$1 and $2 are easily mistaken and are not documented in the header
e096487
of the file. Assigning clear variable names improved readability and
e096487
makes it easier to change the script.
e096487
e096487
Signed-off-by: Niels de Vos <ndevos@redhat.com>
e096487
--- conf/ifplugd.action.orig	2010-05-30 21:12:30.251833801 +0100
e096487
+++ conf/ifplugd.action	2010-05-30 21:14:11.601958801 +0100
e096487
@@ -19,12 +19,15 @@
e096487
 
e096487
 set -e
e096487
 
e096487
-if [ -z "$1" ] || [ -z "$2" ] ; then
e096487
+NETDEV="$1"
e096487
+ACTION="$2"
e096487
+
e096487
+if [ -z "$NETDEV" ] || [ -z "$ACTION" ] ; then
e096487
 	echo "Wrong arguments" > /dev/stderr
e096487
 	exit 1
e096487
 fi
e096487
 
e096487
-[ "$2" = "up" ] && exec /sbin/ifup $1
e096487
-[ "$2" = "down" ] && exec /sbin/ifdown $1
e096487
+[ "$ACTION" = "up" ] && exec /sbin/ifup "$NETDEV"
e096487
+[ "$ACTION" = "down" ] && exec /sbin/ifdown "$NETDEV"
e096487
 
e096487
 exit 1