Package: at
Version: 3.1.10.1.cw1
Severity: wishlist
Tags: patch
The daemon, atd, allows parameters to be passed to it (such as -l to
override the default loadavg limit of 1.5), but there is no easy way to
pass these parameters to the daemon on load. I know, you can always
edit the start section of the init script... but I wouldn't call that
"easy".
What I suggest (and include in a patch) is to provide support for
/etc/default/atd, where administrators can either provide options
directly (in the ARGS variable) or simply set the LOAD_LIMIT variable...
I don't know if having both methods available together is a good idea,
but we can always change the patch if not.
Any thoughts?
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages at depends on:
ii libc6 2.7-10 GNU C Library: Shared libraries
ii libpam0g 0.99.7.1-6 Pluggable Authentication Modules l
ii lsb-base 3.2-12 Linux Standard Base 3.2 init scrip
ii nullmailer [mail-transport-ag 1:1.04-1 simple relay-only mail transport a
at recommends no packages.
-- no debconf information
diff -urN at-3.1.10.1/debian/conffiles at-3.1.10.1.cw1/debian/conffiles
--- at-3.1.10.1/debian/conffiles 2005-08-04 20:28:25.000000000 -0700
+++ at-3.1.10.1.cw1/debian/conffiles 2008-05-08 15:32:00.000000000 -0700
@@ -1,3 +1,4 @@
/etc/at.deny
/etc/init.d/atd
/etc/pam.d/atd
+/etc/default/atd
diff -urN at-3.1.10.1/debian/default at-3.1.10.1.cw1/debian/default
--- at-3.1.10.1/debian/default 1969-12-31 16:00:00.000000000 -0800
+++ at-3.1.10.1.cw1/debian/default 2008-05-08 15:24:56.000000000 -0700
@@ -0,0 +1,6 @@
+# Arguments to pass to atd.
+ARGS=""
+
+# Limiting load factor--the -l switch; see atd(3).
+LOAD_LIMIT=""
+
diff -urN at-3.1.10.1/debian/rc at-3.1.10.1.cw1/debian/rc
--- at-3.1.10.1/debian/rc 2008-01-26 21:20:00.000000000 -0800
+++ at-3.1.10.1.cw1/debian/rc 2008-05-08 15:26:04.000000000 -0700
@@ -16,15 +16,24 @@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/atd
+ARGS=""
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
+if [ -r /etc/default/atd ]; then
+ . /etc/default/atd
+fi
+
+if [ -n "$LOAD_LIMIT" ]; then
+ ARGS="$ARGS -l $LOAD_LIMIT"
+fi
+
case "$1" in
start)
log_daemon_msg "Starting deferred execution scheduler" "atd"
- start_daemon $DAEMON
+ start_daemon -- $DAEMON $ARGS
log_end_msg $?
;;
stop)
diff -urN at-3.1.10.1/debian/rules at-3.1.10.1.cw1/debian/rules
--- at-3.1.10.1/debian/rules 2006-01-02 23:12:56.000000000 -0800
+++ at-3.1.10.1.cw1/debian/rules 2008-05-08 16:23:26.000000000 -0700
@@ -80,9 +80,10 @@
gzip -9 debian/tmp/usr/share/man/man?/*
(cd debian/tmp/usr/share/man/man1 && ln -s at.1.gz atq.1.gz && ln -s
at.1.gz atrm.1.gz && ln -s at.1.gz batch.1.gz)
(cd debian/tmp/usr/share/man/man5 && ln -s at.allow.5.gz at.deny.5.gz)
- $(installbin) -d debian/tmp/etc/init.d debian/tmp/etc/pam.d
+ $(installbin) -d debian/tmp/etc/init.d debian/tmp/etc/pam.d
debian/tmp/etc/default
$(installbin) debian/rc debian/tmp/etc/init.d/atd
$(installbin) debian/pam -m 644 debian/tmp/etc/pam.d/atd
+ $(installbin) debian/default debian/tmp/etc/default/atd
dpkg-shlibdeps debian/tmp/usr/sbin/atd debian/tmp/usr/bin/at
dpkg-gencontrol -isp
dpkg --build debian/tmp ..