rev 19554 - kde-extras/icecream/trunk/debian
Pino Toscano
pino at alioth.debian.org
Fri May 24 09:19:30 UTC 2013
Author: pino
Date: 2013-05-24 09:19:30 +0000 (Fri, 24 May 2013)
New Revision: 19554
Added:
kde-extras/icecream/trunk/debian/icecc.icecc-scheduler.init
kde-extras/icecream/trunk/debian/icecc.iceccd.init
Removed:
kde-extras/icecream/trunk/debian/icecc.init
Modified:
kde-extras/icecream/trunk/debian/changelog
kde-extras/icecream/trunk/debian/rules
Log:
split the init script in two, for iceccd and icecc-scheduler
Modified: kde-extras/icecream/trunk/debian/changelog
===================================================================
--- kde-extras/icecream/trunk/debian/changelog 2013-05-24 09:01:03 UTC (rev 19553)
+++ kde-extras/icecream/trunk/debian/changelog 2013-05-24 09:19:30 UTC (rev 19554)
@@ -32,6 +32,7 @@
* Remove the dpkg 1.9.0 dependency in icecc, since that dpkg version is
available already since Woody (!).
* Rename docs to icecc.docs.
+ * Split the init script in two init scripts for iceccd and icecc-scheduler.
-- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org> Thu, 23 May 2013 20:48:57 +0200
Copied: kde-extras/icecream/trunk/debian/icecc.icecc-scheduler.init (from rev 19553, kde-extras/icecream/trunk/debian/icecc.init)
===================================================================
--- kde-extras/icecream/trunk/debian/icecc.icecc-scheduler.init (rev 0)
+++ kde-extras/icecream/trunk/debian/icecc.icecc-scheduler.init 2013-05-24 09:19:30 UTC (rev 19554)
@@ -0,0 +1,76 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: icecc-scheduler
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: control icecc scheduler start at boot time
+# Description: control icecc scheduler start at boot time by
+# sourcing /etc/default/icecc and /etc/icecc/icecc.conf.
+### END INIT INFO
+
+SCHEDULER=/usr/sbin/icecc-scheduler
+CONFIGFILE=/etc/icecc/icecc.conf
+DEFAULTFILE=/etc/default/icecc
+
+# Read configuration files
+[ -r $CONFIGFILE ] && . $CONFIGFILE
+[ -r $DEFAULTFILE ] && . $DEFAULTFILE
+
+test -x $SCHEDULER || exit 0
+
+. /lib/lsb/init-functions
+
+netname=
+if test -n "$ICECC_NETNAME"; then
+ netname="-n $ICECC_NETNAME"
+fi
+
+start_icecc_scheduler() {
+ if test -z "$ICECC_SCHEDULER_LOG_FILE"; then
+ ICECC_SCHEDULER_LOG_FILE="/var/log/icecc_scheduler"
+ fi
+
+ logfile="-l $ICECC_SCHEDULER_LOG_FILE"
+ : > $ICECC_SCHEDULER_LOG_FILE
+ chown icecc $ICECC_SCHEDULER_LOG_FILE
+ start-stop-daemon --start --quiet --chuid icecc \
+ --exec $SCHEDULER -- -d $logfile $netname
+}
+
+stop_icecc_scheduler() {
+ start-stop-daemon --stop --quiet --signal TERM --oknodo --exec $SCHEDULER
+}
+
+case "$1" in
+ start)
+ if [ "$START_ICECC_SCHEDULER" = "true" ]; then
+ log_daemon_msg "Starting distributed compiler scheduler" "icecc-scheduler"
+ start_icecc_scheduler
+ log_end_msg $?
+ fi
+ ;;
+ stop)
+ log_daemon_msg "Stopping distributed compiler scheduler" "icecc_scheduler"
+ stop_icecc_scheduler
+ log_end_msg $?
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting distributed compiler scheduler" "icecc-scheduler"
+ stop_icecc_scheduler
+ sleep 1
+ if [ "$START_ICECC_SCHEDULER" = "true" ]; then
+ start_icecc_scheduler
+ fi
+ log_end_msg $?
+ ;;
+ *)
+ N=/etc/init.d/icecc-scheduler
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
Copied: kde-extras/icecream/trunk/debian/icecc.iceccd.init (from rev 19553, kde-extras/icecream/trunk/debian/icecc.init)
===================================================================
--- kde-extras/icecream/trunk/debian/icecc.iceccd.init (rev 0)
+++ kde-extras/icecream/trunk/debian/icecc.iceccd.init 2013-05-24 09:19:30 UTC (rev 19554)
@@ -0,0 +1,99 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: iceccd
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: control icecc daemon start at boot time
+# Description: control icecc daemon start at boot time by
+# sourcing /etc/default/icecc and /etc/icecc/icecc.conf.
+### END INIT INFO
+
+DAEMON=/usr/sbin/iceccd
+CONFIGFILE=/etc/icecc/icecc.conf
+DEFAULTFILE=/etc/default/icecc
+
+# Read configuration files
+[ -r $CONFIGFILE ] && . $CONFIGFILE
+[ -r $DEFAULTFILE ] && . $DEFAULTFILE
+
+test -x $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
+netname=
+if test -n "$ICECC_NETNAME"; then
+ netname="-n $ICECC_NETNAME"
+fi
+
+start_icecc_daemon() {
+ logfile=""
+ if test -n "$ICECC_LOG_FILE"; then
+ logfile="-l $ICECC_LOG_FILE"
+ fi
+ nice=
+ if test -n "$ICECC_NICE_LEVEL"; then
+ nice="--nice $ICECC_NICE_LEVEL"
+ fi
+ scheduler=
+ if test -n "$ICECC_SCHEDULER_HOST"; then
+ scheduler="-s $ICECC_SCHEDULER_HOST"
+ fi
+ basedir=
+ if test -n "$ICECC_BASEDIR"; then
+ basedir="-b $ICECC_BASEDIR"
+ fi
+ noremote=
+ if test "$ICECC_ALLOW_REMOTE" = "no"; then
+ noremote="--no-remote"
+ fi
+ maxjobs=
+ if test -n "$ICECC_MAX_JOBS"; then
+ if test "$ICECC_MAX_JOBS" -eq 0; then
+ maxjobs="-m 1"
+ noremote="--no-remote"
+ else
+ maxjobs="-m $ICECC_MAX_JOBS"
+ fi
+ fi
+
+ start-stop-daemon --start --quiet --exec $DAEMON -- \
+ -d $logfile $nice $scheduler $netname -u icecc $basedir $maxjobs $noremote
+}
+
+stop_icecc_daemon() {
+ start-stop-daemon --stop --quiet --signal TERM --oknodo --exec $DAEMON
+}
+
+case "$1" in
+ start)
+ if [ "$START_ICECC" = "true" ]; then
+ log_daemon_msg "Starting distributed compiler daemon" "iceccd"
+ start_icecc_daemon
+ log_end_msg $?
+ fi
+ ;;
+ stop)
+ log_daemon_msg "Stopping distributed compiler daemon" "iceccd"
+ stop_icecc_daemon
+ log_end_msg $?
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting distributed compiler daemon" "iceccd"
+ stop_icecc_daemon
+ sleep 1
+ if [ "$START_ICECC" = "true" ]; then
+ start_icecc_daemon
+ fi
+ log_end_msg $?
+ ;;
+ *)
+ N=/etc/init.d/iceccd
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
Modified: kde-extras/icecream/trunk/debian/rules
===================================================================
--- kde-extras/icecream/trunk/debian/rules 2013-05-24 09:01:03 UTC (rev 19553)
+++ kde-extras/icecream/trunk/debian/rules 2013-05-24 09:19:30 UTC (rev 19554)
@@ -25,6 +25,10 @@
override_dh_install:
dh_install --fail-missing
+override_dh_installinit:
+ dh_installinit -picecc --name=iceccd
+ dh_installinit -picecc --name=icecc-scheduler
+
get-orig-source-dpatch:
@@dh_testdir
@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
More information about the pkg-kde-commits
mailing list