diff -Nru preload-0.6.4/debian/changelog preload-0.6.4/debian/changelog --- preload-0.6.4/debian/changelog 2012-05-30 10:13:58.000000000 +0000 +++ preload-0.6.4/debian/changelog 2012-05-29 18:58:34.000000000 +0000 @@ -1,3 +1,14 @@ +preload (0.6.4-2) unstable; urgency=low + + * Use dh-autoreconf. + * Standards-Version: 3.9.3 (no changes necessary). + * Use source format 3.0 (quilt). + * Use LSB log_ functions. (Closes: #673372) + * Add init.d status support. (Closes: #645156) + * Fix sending HUP in preload's logrotate. (Closes: #619384) + + -- Kari Pahula Tue, 29 May 2012 21:58:33 +0300 + preload (0.6.4-1) unstable; urgency=low * New upstream release (Closes: #495549) diff -Nru preload-0.6.4/debian/control preload-0.6.4/debian/control --- preload-0.6.4/debian/control 2012-05-30 10:13:58.000000000 +0000 +++ preload-0.6.4/debian/control 2012-05-29 19:04:49.000000000 +0000 @@ -2,8 +2,8 @@ Section: misc Priority: optional Maintainer: Kari Pahula -Build-Depends: cdbs, debhelper (>= 6), libglib2.0-dev (>= 2.14), help2man -Standards-Version: 3.8.2 +Build-Depends: cdbs, debhelper (>= 6), libglib2.0-dev (>= 2.14), help2man, dh-autoreconf, lsb-base +Standards-Version: 3.9.3 Homepage: http://sourceforge.net/projects/preload Package: preload diff -Nru preload-0.6.4/debian/init.d preload-0.6.4/debian/init.d --- preload-0.6.4/debian/init.d 2012-05-30 10:13:58.000000000 +0000 +++ preload-0.6.4/debian/init.d 2012-05-29 18:53:59.000000000 +0000 @@ -16,9 +16,11 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/preload NAME=preload -DESC=preload +DESC="Adaptive readahead daemon" DAEMON_OPTS="-s /var/lib/preload/preload.state $DAEMON_OPTS" +. /lib/lsb/init-functions + # Include preload defaults if available if [ -f /etc/default/preload ] ; then . /etc/default/preload @@ -30,36 +32,43 @@ set -e +ret=0 case "$1" in start) - echo -n "Starting $DESC: " - if start-stop-daemon --start --quiet -u 0 $PRELOAD_IOSCHED --exec $DAEMON -- $DAEMON_OPTS; then - echo "$NAME." - else - echo "already running." + log_daemon_msg "Starting $DESC" "$NAME" + start-stop-daemon --start --quiet -u 0 $PRELOAD_IOSCHED --exec $DAEMON -- $DAEMON_OPTS || ret=$? + if [ "$ret" = 1 ]; then + log_progress_msg "already running" + ret=0 fi + log_end_msg $ret ;; stop) - echo -n "Stopping $DESC: " - if start-stop-daemon --stop --retry 1 --quiet -u 0 --exec $DAEMON ; then - echo "$NAME." - else - echo "not running." + log_daemon_msg "Stopping $DESC" "$NAME" + start-stop-daemon --stop --retry 1 --quiet -u 0 --exec $DAEMON || ret=$? + if [ "$ret" = 1 ]; then + log_progress_msg "not running" + ret=0 fi + log_end_msg $ret ;; reload|force-reload) - echo "Reloading $DESC configuration files." - start-stop-daemon --stop $PRELOAD_IOSCHED --signal 1 --quiet -u 0 --exec $DAEMON + log_daemon_msg "$DESC" "Reloading configuration files" + start-stop-daemon --stop $PRELOAD_IOSCHED --signal 1 --quiet -u 0 --exec $DAEMON || ret=$? + log_end_msg $ret ;; restart) - echo -n "Restarting $DESC: " - start-stop-daemon --stop --oknodo --retry 1 --quiet -u 0 --exec $DAEMON - start-stop-daemon --start --quiet -u 0 $PRELOAD_IOSCHED --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." + log_daemon_msg "Restarting $DESC" "$NAME" + start-stop-daemon --stop --oknodo --retry 1 --quiet -u 0 --exec $DAEMON && \ + start-stop-daemon --start --quiet -u 0 $PRELOAD_IOSCHED --exec $DAEMON -- $DAEMON_OPTS || ret=$? + log_end_msg $ret + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; *) N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + log_success_msg "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2 exit 1 ;; esac diff -Nru preload-0.6.4/debian/patches/logrotate_619384 preload-0.6.4/debian/patches/logrotate_619384 --- preload-0.6.4/debian/patches/logrotate_619384 1970-01-01 00:00:00.000000000 +0000 +++ preload-0.6.4/debian/patches/logrotate_619384 2012-05-29 19:02:46.000000000 +0000 @@ -0,0 +1,12 @@ +Index: preload-0.6.4/preload.logrotate.in +=================================================================== +--- preload-0.6.4.orig/preload.logrotate.in 2008-10-23 04:08:20.000000000 +0300 ++++ preload-0.6.4/preload.logrotate.in 2012-05-29 22:02:42.136714774 +0300 +@@ -4,6 +4,6 @@ + size=64k + compress + postrotate +- /bin/kill -HUP `/sbin/pidof preload 2>/dev/null` 2> /dev/null || true ++ /bin/kill -HUP `/bin/pidof preload 2>/dev/null` 2> /dev/null || true + endscript + } diff -Nru preload-0.6.4/debian/patches/series preload-0.6.4/debian/patches/series --- preload-0.6.4/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ preload-0.6.4/debian/patches/series 2012-05-29 18:57:40.000000000 +0000 @@ -0,0 +1 @@ +logrotate_619384 diff -Nru preload-0.6.4/debian/rules preload-0.6.4/debian/rules --- preload-0.6.4/debian/rules 2012-05-30 10:13:58.000000000 +0000 +++ preload-0.6.4/debian/rules 2012-05-29 18:07:22.000000000 +0000 @@ -1,7 +1,9 @@ #!/usr/bin/make -f DEB_DH_INSTALLINIT_ARGS := -- defaults 95 5 +DEB_BUILD_PARALLEL=yes +include /usr/share/cdbs/1/rules/autoreconf.mk include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/rules/debhelper.mk diff -Nru preload-0.6.4/debian/source/format preload-0.6.4/debian/source/format --- preload-0.6.4/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ preload-0.6.4/debian/source/format 2012-05-30 10:13:58.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt)