[apt-proxy-devel] r682 - branches/1.9.36/debian
Chris Halls
halls at alioth.debian.org
Tue Mar 25 13:17:04 UTC 2008
Author: halls
Date: Tue Mar 25 13:17:04 2008
New Revision: 682
Log:
Use LSB log message functions, based on patch by Steven Harms / Ubuntu, thanks! (Closes: #408024)
Modified:
branches/1.9.36/debian/changelog
branches/1.9.36/debian/init.d
Modified: branches/1.9.36/debian/changelog
==============================================================================
--- branches/1.9.36/debian/changelog (original)
+++ branches/1.9.36/debian/changelog Tue Mar 25 13:17:04 2008
@@ -3,8 +3,10 @@
* fix FTBFS: po4a fails. Thanks to Miguel Gea Milvaques for the partial
solution. Added more temporary hacks but it seems we are using help2man
in the wrong way for French translations at the moment. (Closes: #470345)
+ * Use LSB log message functions, based on patch by Steven Harms / Ubuntu,
+ thanks! (Closes: #408024)
- -- Chris Halls <halls at debian.org> Tue, 25 Mar 2008 12:43:32 +0000
+ -- Chris Halls <halls at debian.org> Tue, 25 Mar 2008 13:16:18 +0000
apt-proxy (1.9.36.1) unstable; urgency=low
Modified: branches/1.9.36/debian/init.d
==============================================================================
--- branches/1.9.36/debian/init.d (original)
+++ branches/1.9.36/debian/init.d Tue Mar 25 13:17:04 2008
@@ -10,6 +10,8 @@
user=aptproxy
group=nogroup
+. /lib/lsb/init-functions
+
[ -r /etc/default/apt-proxy ] && . /etc/default/apt-proxy
test -x $twistd || exit 0
@@ -33,7 +35,7 @@
case "$1" in
start)
- echo -n "Starting apt-proxy"
+ log_daemon_msg "Starting apt-proxy"
[ ! -d $rundir ] && mkdir $rundir
[ ! -f $logfile ] && touch $logfile
chown $user $rundir $logfile
@@ -43,11 +45,11 @@
start-stop-daemon --start --quiet --exec $twistd -- \
--pidfile=$pidfile --rundir=$rundir --python=$application \
--logfile=$logfile --no_save
- echo "."
+ log_end_msg $?
;;
stop)
- echo -n "Stopping apt-proxy"
+ log_daemon_msg "Stopping apt-proxy"
start-stop-daemon --stop --quiet --pidfile $pidfile
#
# Continue stopping until daemon finished or time over
@@ -56,21 +58,21 @@
pid=$(cat $pidfile 2>/dev/null)
while alive $pid; do
if [ $count -gt 20 ]; then
- echo -n " aborted"
+ log_progress_msg " aborted"
break;
elif [ $count = 1 ]; then
- echo -n " [wait $count"
+ log_progress_msg " [wait $count"
elif [ $count -gt 1 ]; then
- echo -n " $count"
+ log_progress_msg " $count"
fi
count=$(expr $count + 1)
sleep 1
start-stop-daemon --stop --quiet --pidfile $pidfile
done
if [ $count -gt 1 ]; then
- echo -n "]"
+ log_progress_msg "]"
fi
- echo "."
+ log_end_msg $?
;;
restart)
@@ -83,7 +85,7 @@
;;
*)
- echo "Usage: /etc/init.d/apt-proxy {start|stop|restart|force-reload}" >&2
+ log_success_msg "Usage: /etc/init.d/apt-proxy {start|stop|restart|force-reload}"
exit 1
;;
esac
More information about the apt-proxy-devel
mailing list