- fix netplugd init script (#242919)

This commit is contained in:
Radek Vokál 2007-06-08 11:33:48 +00:00
parent 5fc17560d7
commit 2a549cca07
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,32 @@
--- net-tools-1.60/netplug-1.2.9/scripts/rc.netplugd.old 2007-06-08 13:03:45.000000000 +0200
+++ net-tools-1.60/netplug-1.2.9/scripts/rc.netplugd 2007-06-08 13:04:01.000000000 +0200
@@ -17,11 +17,6 @@
# Source networking configuration.
. /etc/sysconfig/network
-# Check that networking is up.
-[ ${NETWORKING} = "no" ] && exit 0
-
-[ -x /sbin/netplugd ] || exit 0
-
if [ -f /etc/sysconfig/netplugd ]; then
. /etc/sysconfig/netplugd
fi
@@ -30,6 +25,8 @@
case "$1" in
start)
# Start daemon.
+ [ ${NETWORKING} = "no" ] && exit 1
+ [ -x /sbin/netplugd ] || exit 1
echo -n $"Starting network plug daemon: "
daemon /sbin/netplugd ${NETPLUGDARGS} -p /var/run/netplugd.pid
RETVAL=$?
@@ -57,7 +54,7 @@
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
- RETVAL=1
+ RETVAL=3
;;
esac

View File

@ -3,7 +3,7 @@
Summary: Basic networking tools
Name: net-tools
Version: 1.60
Release: 82%{?dist}
Release: 83%{?dist}
License: GPL
Group: System Environment/Base
URL: http://www.tazenda.demon.co.uk/phil/net-tools/
@ -73,6 +73,7 @@ Patch59: net-tools-1.60-arp-unaligned-access.patch
Patch60: net-tools-1.60-sctp-quiet.patch
Patch61: net-tools-1.60-remove_node.patch
Patch62: net-tools-1.60-netstat-interfaces-crash.patch
Patch63: net-tools-1.60-netplugd_init.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/chkconfig
@ -146,6 +147,7 @@ ifconfig, netstat, route, and others.
%patch60 -p1 -b .quiet
%patch61 -p1
%patch62 -p1 -b .iface-crash
%patch63 -p1
cp %SOURCE2 ./config.h
cp %SOURCE3 ./config.make
@ -261,6 +263,9 @@ exit 0
%{_sysconfdir}/rc.d/init.d/netplugd
%changelog
* Fri Jun 8 2007 Radek Vokál <rvokal@redhat.com> - 1.60-83
- fix netplugd init script (#242919)
* Tue May 22 2007 Radek Vokál <rvokal@redhat.com> - 1.60-82
- better SELinux patch by <dwalsh@redhat.com>