rpms/netplug/devel netplug.spec, 1.1, 1.2 netplug-1.2.9.1-init.patch, 1.1, 1.2
Jiří Popelka
jpopelka at fedoraproject.org
Wed Sep 30 10:14:07 UTC 2009
- Previous message (by thread): rpms/anerley/devel .cvsignore, 1.4, 1.5 anerley.spec, 1.8, 1.9 sources, 1.4, 1.5 anerley-mc5-port.patch, 1.1, NONE anerley-pkgcfg-mc5.patch, 1.1, NONE
- Next message (by thread): rpms/moblin-panel-status/devel .cvsignore, 1.4, 1.5 moblin-panel-status.spec, 1.6, 1.7 sources, 1.4, 1.5 mps-mc5-port.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jpopelka
Update of /cvs/pkgs/rpms/netplug/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10188
Modified Files:
netplug.spec netplug-1.2.9.1-init.patch
Log Message:
* Wed Sep 30 2009 Jiri Popelka <jpopelka at redhat.com> - 1.2.9.1-2
- fix init script to be LSB-compliant (#521641)
Index: netplug.spec
===================================================================
RCS file: /cvs/pkgs/rpms/netplug/devel/netplug.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- netplug.spec 29 Sep 2009 09:20:58 -0000 1.1
+++ netplug.spec 30 Sep 2009 10:14:06 -0000 1.2
@@ -1,7 +1,7 @@
Summary: Daemon that responds to network cables being plugged in and out
Name: netplug
Version: 1.2.9.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: System Environment/Base
URL: http://www.red-bean.com/~bos/
@@ -11,6 +11,7 @@ Source0: http://www.red-bean.com/~bos/ne
Patch1: netplug-1.2.9.1-execshield.patch
#fix netplugd init script (#242919)
+#fix init script to be LSB-compliant (#521641)
Patch2: netplug-1.2.9.1-init.patch
Requires: iproute >= 2.4.7
@@ -81,5 +82,8 @@ exit 0
%changelog
+* Wed Sep 30 2009 Jiri Popelka <jpopelka at redhat.com> - 1.2.9.1-2
+- fix init script to be LSB-compliant (#521641)
+
* Tue Sep 8 2009 Jiri Popelka <jpopelka at redhat.com> - 1.2.9.1-1
-- Initial standalone package. Up to now netplug has been part of net-tools.
\ No newline at end of file
+- Initial standalone package. Up to now netplug has been part of net-tools.
netplug-1.2.9.1-init.patch:
rc.netplugd | 111 ++++++++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 82 insertions(+), 29 deletions(-)
Index: netplug-1.2.9.1-init.patch
===================================================================
RCS file: /cvs/pkgs/rpms/netplug/devel/netplug-1.2.9.1-init.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- netplug-1.2.9.1-init.patch 29 Sep 2009 09:20:58 -0000 1.1
+++ netplug-1.2.9.1-init.patch 30 Sep 2009 10:14:06 -0000 1.2
@@ -1,33 +1,140 @@
diff -up netplug-1.2.9.1/scripts/rc.netplugd.init netplug-1.2.9.1/scripts/rc.netplugd
--- netplug-1.2.9.1/scripts/rc.netplugd.init 2008-12-23 00:36:23.000000000 +0100
-+++ netplug-1.2.9.1/scripts/rc.netplugd 2009-09-08 11:55:03.000000000 +0200
-@@ -17,11 +17,6 @@
++++ netplug-1.2.9.1/scripts/rc.netplugd 2009-09-21 14:49:42.000000000 +0200
+@@ -1,5 +1,12 @@
+ #!/bin/sh
+ #
++### BEGIN INIT INFO
++# Provides: netplugd
++# Short-Description: start and stop network plug daemon
++# Description: netplugd is a daemon for managing non-static network
++# interfaces.
++### END INIT INFO
++#
+ # netplugd This shell script takes care of starting and stopping
+ # the network plug management daemon.
+ #
+@@ -17,48 +24,94 @@
# Source networking configuration.
. /etc/sysconfig/network
-# Check that networking is up.
-[ ${NETWORKING} = "no" ] && exit 0
--
++[ -f /etc/sysconfig/netplugd ] && . /etc/sysconfig/netplugd
++
+
-[ -x /sbin/netplugd ] || exit 0
--
- if [ -f /etc/sysconfig/netplugd ]; then
- . /etc/sysconfig/netplugd
++prog=netplugd
++exec=/sbin/netplugd
++config=/etc/netplug.d/netplugd.conf
++lockfile=/var/lock/subsys/netplugd
++pidfile=/var/run/netplugd.pid
++
++check() {
++ # Check that we're a privileged user
++ [ `id -u` = 0 ] || exit 4
++
++ # Check if netplugd is executable
++ [ -x $exec ] || exit 5
++}
+
+-if [ -f /etc/sysconfig/netplugd ]; then
+- . /etc/sysconfig/netplugd
++start () {
++ check
++
++ [ ${NETWORKING} = "no" ] && exit 1
++ [ -f $config ] || exit 6
++
++ echo -n $"Starting $prog: "
++ daemon $exec ${NETPLUGDARGS} -p $pidfile
++ RETVAL=$?
++ echo
++
++ [ $RETVAL -eq 0 ] && touch $lockfile
++ return $RETVAL
++}
++
++stop () {
++ check
++
++ echo -n $"Shutting down $prog: "
++ killproc $prog
++ RETVAL=$?
++ echo
++
++ [ $RETVAL -eq 0 ] && rm -f $lockfile
++ return $RETVAL
++}
++
++restart() {
++ stop
++ start
++}
++
++rh_status() {
++ status $prog
++}
++
++rh_status_q() {
++ rh_status >/dev/null 2>&1
++}
++
++if [ $# -gt 1 ]; then
++ exit 2
fi
-@@ -30,6 +25,8 @@ fi
+
+-# See how we were called.
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 @@ case "$1" in
+- # Start daemon.
+- echo -n $"Starting network plug daemon: "
+- daemon /sbin/netplugd ${NETPLUGDARGS} -p /var/run/netplugd.pid
+- RETVAL=$?
+- echo
+- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/netplugd
++ rh_status_q && exit 0
++ start
+ ;;
+ stop)
+- # Stop daemon.
+- echo -n $"Shutting down network plug daemon: "
+- killproc netplugd
+- RETVAL=$?
+- echo
+- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/netplugd
++ rh_status_q || exit 0
++ stop
+ ;;
+- status)
+- status netplugd
+- RETVAL=$?
++ restart|force-reload)
++ restart
+ ;;
+- restart|reload)
+- $0 stop
+- $0 start
++ reload)
++ rh_status_q || exit 7
++ restart
++ ;;
++ condrestart|try-restart)
++ rh_status_q || exit 0
++ restart
+ ;;
+- condrestart)
+- [ -f /var/lock/subsys/netplugd ] && restart || :
++ status)
++ rh_status
;;
*)
- echo $"Usage: $0 {start|stop|status|restart}"
+- echo $"Usage: $0 {start|stop|status|restart}"
- RETVAL=1
-+ RETVAL=3
++ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
++ exit 2
;;
esac
+-exit $RETVAL
++exit $?
- Previous message (by thread): rpms/anerley/devel .cvsignore, 1.4, 1.5 anerley.spec, 1.8, 1.9 sources, 1.4, 1.5 anerley-mc5-port.patch, 1.1, NONE anerley-pkgcfg-mc5.patch, 1.1, NONE
- Next message (by thread): rpms/moblin-panel-status/devel .cvsignore, 1.4, 1.5 moblin-panel-status.spec, 1.6, 1.7 sources, 1.4, 1.5 mps-mc5-port.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list