Репозитории ALT
Группа :: Система/Настройка/Сеть
Пакет: ifplugd
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: ifplugd-0.28-alt-etcnet.patch
Скачать
Скачать
diff -urN ifplugd-0.28.vanilla/conf/ifplugd.action ifplugd-0.28/conf/ifplugd.action
--- ifplugd-0.28.vanilla/conf/ifplugd.action 2004-03-03 03:02:18 +0200
+++ ifplugd-0.28/conf/ifplugd.action 2005-08-03 22:49:52 +0300
@@ -20,11 +20,28 @@
set -e
if [ -z "$1" ] || [ -z "$2" ] ; then
- echo "Wrong arguments" > /dev/stderr
+ logger -d "Wrong arguments to $0: '$@'"
exit 1
fi
-[ "$2" = "up" ] && exec /sbin/ifup $1
-[ "$2" = "down" ] && exec /sbin/ifdown $1
+NS_IFUP=/sbin/ifup
+NS_IFDOWN=/sbin/ifdown
+N_C_S_CONFIG=/etc/sysconfig/network
+
+. $N_C_S_CONFIG
+
+case $CONFMETHOD in
+ etcnet)
+ # /etc/net 0.7.10 manages ifplugd itself. Refer to /etc/net documentation.
+ ;;
+ net-scripts)
+ [ "$2" = "up" ] && exec $NS_IFUP $1
+ [ "$2" = "down" ] && exec $NS_IFDOWN $1
+ ;;
+ *)
+ logger -d -p user.err -t ifplugd.action -- "fix your $N_C_S_CONFIG and set CONFMETHOD correctly"
+ ;;
+esac
+
exit 1