Package: at Version: 3.1.12-1 Severity: normal Tags: patch Please add in support for the POSIX -r option.
mike@tesla:~$ echo ls | at 00:00 warning: commands will be executed using /bin/sh job 19 at Mon Mar 7 00:00:00 2011 mike@tesla:~$ at -l 19 Mon Mar 7 00:00:00 2011 a mike mike@tesla:~$ at -r 19 mike@tesla:~$ at -l mike@tesla:~$ The included patch fixes this defect and the associated man page and usage text. -- System Information: Debian Release: 6.0 APT prefers proposed-updates APT policy: (500, 'proposed-updates'), (500, 'stable'), (101, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages at depends on: ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ii libpam-runtime 1.1.1-6.1 Runtime support for the PAM librar ii libpam0g 1.1.1-6.1 Pluggable Authentication Modules l ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip Versions of packages at recommends: ii exim4-daemon-light [mail-tran 4.72-6 lightweight Exim MTA (v4) daemon at suggests no packages. -- Configuration Files: /etc/at.deny [Errno 13] Permission denied: u'/etc/at.deny' -- no debconf information
>From c606b3096d8120c5ff72f3c6574d27ba6e6be042 Mon Sep 17 00:00:00 2001 From: Mike Miller <[email protected]> Date: Sun, 6 Mar 2011 12:57:04 -0500 Subject: [PATCH] Add support for -r option required by POSIX. Add -r as a synonym for -d and atrm. Clean up man page and usage to show -r and -d options in the right context. Signed-off-by: Mike Miller <[email protected]> --- at.1.in | 13 +++++++++++-- at.c | 2 +- panic.c | 5 +++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/at.1.in b/at.1.in index 66fd958..636c64f 100644 --- a/at.1.in +++ b/at.1.in @@ -8,7 +8,7 @@ at, batch, atq, atrm \- queue, examine or delete jobs for later execution .IR queue ] .RB [ -f .IR file ] -.RB [ -mldv ] +.RB [ -mlv ] .IR timespec ... .br .B at @@ -17,7 +17,7 @@ at, batch, atq, atrm \- queue, examine or delete jobs for later execution .IR queue ] .RB [ -f .IR file ] -.RB [ -mkdv ] +.RB [ -mkv ] .RB [ -t .IR time ] .br @@ -30,6 +30,11 @@ at, batch, atq, atrm \- queue, examine or delete jobs for later execution .RB [ -q .IR queue ] .br +.B at +.RB [ -rd ] +.I job +.RI [ job... ] +.br .B atrm .RB [ -V ] .I job @@ -243,6 +248,10 @@ given in the format [[CC]YY]MMDDhhmm[.ss] Is an alias for .B atq. .TP +.B \-r +Is an alias for +.B atrm. +.TP .B \-d Is an alias for .B atrm. diff --git a/at.c b/at.c index 2b178e4..af634a2 100644 --- a/at.c +++ b/at.c @@ -730,7 +730,7 @@ main(int argc, char **argv) char *pgm; int program = AT; /* our default program */ - char *options = "q:f:MmvldhVct:"; /* default options for at */ + char *options = "q:f:MmvlrdhVct:"; /* default options for at */ int disp_version = 0; time_t timer = 0; struct passwd *pwe; diff --git a/panic.c b/panic.c index f7059e0..bbc793f 100644 --- a/panic.c +++ b/panic.c @@ -92,10 +92,11 @@ usage(void) { /* Print usage and exit. */ - fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-mldbv] timespec ...\n" - " at [-V] [-q x] [-f file] [-mldbv] -t time\n" + fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-mlbv] timespec ...\n" + " at [-V] [-q x] [-f file] [-mlbv] -t time\n" " at -c job ...\n" " atq [-V] [-q x]\n" + " at [ -rd ] job ...\n" " atrm [-V] job ...\n" " batch\n"); exit(EXIT_FAILURE); -- 1.7.2.5

