rpms/nut/F-8 nut.spec,1.49,1.50 ups.init,1.8,1.9

Tomas Smetana (tsmetana) fedora-extras-commits at redhat.com
Wed Nov 28 11:59:27 UTC 2007


Author: tsmetana

Update of /cvs/pkgs/rpms/nut/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2341

Modified Files:
	nut.spec ups.init 
Log Message:
* Wed Nov 28 2007 Tomas Smetana <tsmetana at redhat.com> 2.2.0-6
- fix forgotten bug in init script
- do not hardcode the uucp group in udev patch



Index: nut.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nut/F-8/nut.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- nut.spec	27 Nov 2007 13:26:29 -0000	1.49
+++ nut.spec	28 Nov 2007 11:58:54 -0000	1.50
@@ -9,7 +9,7 @@
 Summary: Network UPS Tools
 Name: nut
 Version: 2.2.0
-Release: 5%{?dist}
+Release: 6%{?dist}
 Group: Applications/System
 License: GPLv2+
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -301,6 +301,10 @@
 %{_libdir}/pkgconfig/libupsclient.pc
 
 %changelog
+* Wed Nov 28 2007 Tomas Smetana <tsmetana at redhat.com> 2.2.0-6
+- fix forgotten bug in init script
+- do not hardcode the uucp group in udev patch
+
 * Tue Nov 27 2007 Tomas Smetana <tsmetana at redhat.com> 2.2.0-5
 - fix udev rules and hal information files
 - fix init script


Index: ups.init
===================================================================
RCS file: /cvs/pkgs/rpms/nut/F-8/ups.init,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ups.init	16 Aug 2007 10:31:13 -0000	1.8
+++ ups.init	28 Nov 2007 11:58:54 -0000	1.9
@@ -26,27 +26,27 @@
 start() {
 	if [ "$SERVER" = "yes" ]; then
 		echo -n $"Starting UPS driver controller: "
-		daemon /sbin/upsdrvctl start
+		daemon /sbin/upsdrvctl start > /dev/null 2>&1 && success || failure
 		RETVAL=$?
 		echo
 
 		prog="upsd"
 		echo -n $"Starting $prog: "
-		daemon /usr/sbin/upsd $UPSD_OPTIONS
+		daemon /usr/sbin/upsd $UPSD_OPTIONS > /dev/null 2>&1 && success || failure
 		if [ "$RETVAL" = 0 ]; then
 			RETVAL=$?
 		fi
 		echo
 
 		echo -n $"Starting UPS monitor (master): "
-		daemon /usr/sbin/upsmon
+		daemon /usr/sbin/upsmon > dev/null 2>&1 && success || failure
 		if [ "$RETVAL" = 0 ]; then
 			RETVAL=$?
 		fi
 		echo
 	else
 		echo -n $"Starting UPS monitor (slave): "
-		daemon /usr/sbin/upsmon
+		daemon /usr/sbin/upsmon > /dev/null 2>&1 && success || failure
 		echo
 	fi
 
@@ -61,15 +61,14 @@
 	if [ "$SERVER" = "yes" ]; then
 		prog="upsd"
 		echo -n $"Stopping $prog: "
-		killproc upsd
+		killproc upsd > /dev/null 2>&1 && success || failure
 		RETVAL=$?
 		echo
 
-		echo -n $"Shutting down $MODEL: "
-		if [ "$MODEL" = "upsdrvctl" ]; then
-			/sbin/upsdrvctl stop
-		else
-			killproc $MODEL
+		echo -n $"Shutting down upsdrvctl: "
+		/sbin/upsdrvctl stop > /dev/null 2>&1 && success || failure
+		if [ "$RETVAL" = 0 ]; then
+			RETVAL=$?
 		fi
 		echo
 	fi
@@ -117,15 +116,6 @@
 
 	status)
 		if [ "$SERVER" = "yes" ]; then
-			if [ "$MODEL" = "upsdrvctl" ]; then
-				# show status of each configured driver
-				for MYMODEL in $(egrep '^[[:space:]]*driver' /etc/ups/ups.conf \
-						| sed 's/.*=[[:space:]]*//'); do 
-					status $MYMODEL
-				done
-			else
-				status $MODEL
-			fi
 			status upsd
 		fi
 		status upsmon




More information about the fedora-extras-commits mailing list