rpms/lcdproc/devel lcdproc-0.5.2-initscripts.patch, 1.6, 1.7 lcdproc.spec, 1.14, 1.15

Nicolas Chauvet kwizart at fedoraproject.org
Wed May 13 16:39:28 UTC 2009


Author: kwizart

Update of /cvs/pkgs/rpms/lcdproc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11860/devel

Modified Files:
	lcdproc-0.5.2-initscripts.patch lcdproc.spec 
Log Message:
- Improve the initscripts patch - Fix #498384


lcdproc-0.5.2-initscripts.patch:

Index: lcdproc-0.5.2-initscripts.patch
===================================================================
RCS file: /cvs/pkgs/rpms/lcdproc/devel/lcdproc-0.5.2-initscripts.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- lcdproc-0.5.2-initscripts.patch	14 Apr 2009 14:23:10 -0000	1.6
+++ lcdproc-0.5.2-initscripts.patch	13 May 2009 16:38:58 -0000	1.7
@@ -1,6 +1,6 @@
 diff -up lcdproc-0.5.2/scripts/init-LCDd.LSB.in.initscripts lcdproc-0.5.2/scripts/init-LCDd.LSB.in
 --- lcdproc-0.5.2/scripts/init-LCDd.LSB.in.initscripts	2007-04-14 16:41:20.000000000 +0200
-+++ lcdproc-0.5.2/scripts/init-LCDd.LSB.in	2009-04-14 16:15:46.000000000 +0200
++++ lcdproc-0.5.2/scripts/init-LCDd.LSB.in	2009-05-13 17:14:25.000000000 +0200
 @@ -1,10 +1,18 @@
  #! /bin/sh
 +#
@@ -22,7 +22,7 @@ diff -up lcdproc-0.5.2/scripts/init-LCDd
  # Default-Stop:      S 0 1 6
  # Short-Description: LCDproc Server Daemon
  # Description:       LSB init script for LCDd, the display
-@@ -12,57 +20,62 @@
+@@ -12,57 +20,92 @@
  ### END INIT INFO
  
  
@@ -43,45 +43,79 @@ diff -up lcdproc-0.5.2/scripts/init-LCDd
 -# Source defaults file; edit that file to configure this script.
 -if [ -e "${DEFAULTS}" ]; then
 -  . "${DEFAULTS}"
--fi
 +prog=LCDd
 +lockfile=/var/lock/subsys/$prog
 +configfile=@sysconfdir@/$prog.conf
 +RETVAL=0
 +
- 
--# If we're not to start the daemon, simply exit
--if [ "${START}" != "yes" ]; then
--    exit 0
++
 +# load LSB 3.x init functions
 +if [ -e /lib/lsb/init-functions ]; then
 +  . /lib/lsb/init-functions
  fi
  
--# installation check
--test -x $DAEMON || exit 5
+-# If we're not to start the daemon, simply exit
+-if [ "${START}" != "yes" ]; then
+-    exit 0
 +# Source function library.
 +if [ -e /etc/rc.d/init.d/functions ]; then
 +  . /etc/rc.d/init.d/functions
-+fi
+ fi
  
--# load LSB 3.x init functions
--. /lib/lsb/init-functions
+-# installation check
+-test -x $DAEMON || exit 5
 +# check that non-default config file exists.
 + [ -f $configfile ] || exit 6
  
+-# load LSB 3.x init functions
+-. /lib/lsb/init-functions
++
++start() {
++	echo -n $"Starting $prog services: "
++	daemon $prog -c $configfile
++	RETVAL=$?
++	echo
++	[ $RETVAL -eq 0 ] && touch $lockfile || \
++	   RETVAL=1
++	return $RETVAL
++}	
++
++stop() {
++	echo -n $"Shutting down $prog services: "
++	killproc $prog
++	RETVAL=$?
++	echo
++	[ $RETVAL -eq 0 ] && rm -f $lockfile
++	return $RETVAL
++}	
++
++reload() {
++        echo -n $"Reloading $prog file: "
++	killproc $prog -HUP
++	RETVAL=$?
++	echo
++	return $RETVAL
++}	
++
++rhstatus() {
++	status $prog
++	return $?
++}	
++
++
++# Allow status as non-root.
++if [ "$1" = status ]; then
++       rhstatus
++       exit $?
++fi
+ 
  
  case "$1" in
    start)
 -	log_daemon_msg "Starting $DESC" "$NAME"
 -	start_daemon $DAEMON $OPTIONS
 -	log_end_msg $?
-+	echo -n $"Starting $prog: "
-+	daemon $prog -c $configfile
-+	RETVAL=$?
-+        echo
-+	[ $RETVAL -eq 0 ] && touch $lockfile
-+	return $RETVAL
++	start
  	;;
    stop)
 -	log_daemon_msg "Stopping $DESC" "$NAME"
@@ -92,12 +126,7 @@ diff -up lcdproc-0.5.2/scripts/init-LCDd
 -	$0 stop
 -	sleep 1
 -	$0 start
-+	echo -n $"Shutting down $prog: "
-+	killproc $prog
-+	RETVAL=$?
-+        echo
-+	[ $RETVAL -eq 0 ] && rm -f $lockfile
-+	return $RETVAL
++	stop
 +	;;
 +  status)
 +	status $prog
@@ -113,7 +142,7 @@ diff -up lcdproc-0.5.2/scripts/init-LCDd
 +	fi
 +	;;
 +  reload)
-+	exit 3
++	reload
  	;;
    *)
 -	echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
@@ -126,7 +155,7 @@ diff -up lcdproc-0.5.2/scripts/init-LCDd
 +exit $RETVAL
 diff -up lcdproc-0.5.2/scripts/init-lcdproc.LSB.in.initscripts lcdproc-0.5.2/scripts/init-lcdproc.LSB.in
 --- lcdproc-0.5.2/scripts/init-lcdproc.LSB.in.initscripts	2007-04-14 16:41:20.000000000 +0200
-+++ lcdproc-0.5.2/scripts/init-lcdproc.LSB.in	2009-04-14 16:16:19.000000000 +0200
++++ lcdproc-0.5.2/scripts/init-lcdproc.LSB.in	2009-05-13 10:37:32.000000000 +0200
 @@ -1,10 +1,19 @@
  #! /bin/sh
 +#
@@ -149,7 +178,7 @@ diff -up lcdproc-0.5.2/scripts/init-lcdp
  # Default-Stop:      S 0 1 6
  # Short-Description: LCDproc system status information viewer
  # Description:       LSB init script for lcdproc, the system
-@@ -12,57 +21,60 @@
+@@ -12,57 +21,91 @@
  ### END INIT INFO
  
  
@@ -170,44 +199,78 @@ diff -up lcdproc-0.5.2/scripts/init-lcdp
 -# Source defaults file; edit that file to configure this script.
 -if [ -e "${DEFAULTS}" ]; then
 -  . "${DEFAULTS}"
--fi
 +prog=lcdproc
 +lockfile=/var/lock/subsys/$prog
 +configfile=@sysconfdir@/$prog.conf
 +RETVAL=0
++
++# load LSB 3.x init functions
++if [ -e /lib/lsb/init-functions ]; then
++  . /lib/lsb/init-functions
+ fi
  
 -# If we're not to start the daemon, simply exit
 -if [ "${START}" != "yes" ]; then
 -    exit 0
-+# load LSB 3.x init functions
-+if [ -e /lib/lsb/init-functions ]; then
-+  . /lib/lsb/init-functions
++# Source function library.
++if [ -e /etc/rc.d/init.d/functions ]; then
++  . /etc/rc.d/init.d/functions
  fi
  
 -# installation check
 -test -x $DAEMON || exit 5
--
++# check that non-default config file exists.
++ [ -f $configfile ] || exit 6
+ 
 -# load LSB 3.x init functions
 -. /lib/lsb/init-functions
-+# Source function library.
-+if [ -e /etc/rc.d/init.d/functions ]; then
-+  . /etc/rc.d/init.d/functions
++
++start() {
++	echo -n $"Starting $prog services: "
++	daemon $prog -c $configfile
++	RETVAL=$?
++	echo
++	[ $RETVAL -eq 0 ] && touch $lockfile || \
++	   RETVAL=1
++	return $RETVAL
++}	
++
++stop() {
++	echo -n $"Shutting down $prog services: "
++	killproc $prog
++	RETVAL=$?
++	echo
++	[ $RETVAL -eq 0 ] && rm -f $lockfile
++	return $RETVAL
++}	
++
++reload() {
++        echo -n $"Reloading $prog file: "
++	killproc $prog -HUP
++	RETVAL=$?
++	echo
++	return $RETVAL
++}	
++
++rhstatus() {
++	status $prog
++	return $?
++}	
++
++
++# Allow status as non-root.
++if [ "$1" = status ]; then
++       rhstatus
++       exit $?
 +fi
  
-+# check that non-default config file exists.
-+ [ -f $configfile ] || exit 6
  
  case "$1" in
    start)
 -	log_daemon_msg "Starting $DESC" "$NAME"
 -	start_daemon $DAEMON $OPTIONS
 -	log_end_msg $?
-+	echo -n $"Starting $prog: "
-+	daemon $prog -c $configfile
-+	RETVAL=$?
-+        echo
-+	[ $RETVAL -eq 0 ] && touch $lockfile
-+	return $RETVAL
++	start
  	;;
    stop)
 -	log_daemon_msg "Stopping $DESC" "$NAME"
@@ -218,12 +281,7 @@ diff -up lcdproc-0.5.2/scripts/init-lcdp
 -	$0 stop
 -	sleep 1
 -	$0 start
-+	echo -n $"Shutting down $prog: "
-+	killproc $prog
-+	RETVAL=$?
-+        echo
-+	[ $RETVAL -eq 0 ] && rm -f $lockfile
-+	return $RETVAL
++	stop
 +	;;
 +  status)
 +	status $prog
@@ -239,7 +297,7 @@ diff -up lcdproc-0.5.2/scripts/init-lcdp
 +	fi
 +	;;
 +  reload)
-+	exit 3
++	reload
  	;;
    *)
 -	echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2


Index: lcdproc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lcdproc/devel/lcdproc.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- lcdproc.spec	14 Apr 2009 14:23:10 -0000	1.14
+++ lcdproc.spec	13 May 2009 16:38:58 -0000	1.15
@@ -1,7 +1,7 @@
 Summary:        LCDproc displays real-time system information on a 20x4 backlit LCD
 Name:           lcdproc
 Version:        0.5.2
-Release:        11%{?dist}
+Release:        12%{?dist}
 License:        GPLv2
 URL:            http://lcdproc.omnipotent.net
 Group:          System Environment/Libraries
@@ -148,6 +148,9 @@ rm -rf $RPM_BUILD_ROOT __doc
 
 
 %changelog
+* Wed May 13 2009 kwizart < kwizart at gmail.com > - 0.5.2-12
+- Improve the initscripts patch - Fix #498384
+
 * Tue Apr 14 2009 kwizart < kwizart at gmail.com > - 0.5.2-11
 - Disable xmlto validation (Fix FTBFS)
 - Disable default configuration (only provided as examples)




More information about the scm-commits mailing list