Package: debianutils
Version: 2.15.2
Severity: wishlist
Hello.
Attached is a simple patch that let you choose the date
format used for -d on the command line.
Using YYYYmmddHHMMSS seems to noisy, and with this patch both
YYYYmmdd and (what we want) YYYY-mm-dd is possible.
--
Lasse Karstensen
--- debianutils-2.15.2/savelog 2005-02-28 04:37:52.000000000 +0100
+++ savelog 2007-10-20 14:35:14.000000000 +0200
@@ -21,6 +21,7 @@
# -r rolldir- use rolldir instead of . to roll files
# -C - force cleanup of cycled logfiles
# -d - use standard date for rolling
+# -f - override date format for -d
# -t - touch file
# -l - don't compress any log files (default: compress)
# -p - preserve mode/user/group of original file
@@ -107,6 +108,7 @@
echo " -r rolldir - use rolldir instead of . to roll files"
echo " -C - force cleanup of cycled logfiles"
echo " -d - use standard date for rolling"
+ echo " -f - override date format for -d"
echo " -t - touch file"
echo " -l - don't compress any log files (default: compress)"
echo " -p - preserve mode/user/group of original file"
@@ -131,7 +133,7 @@
}
-while getopts m:u:g:c:r:Cdtlphjnq opt ; do
+while getopts m:u:g:c:r:Cdf:tlphjnq opt ; do
case "$opt" in
m) mode="$OPTARG" ;;
u) user="$OPTARG" ;;
@@ -140,6 +142,7 @@
r) rolldir="$OPTARG" ;;
C) forceclean=1 ;;
d) datum=1 ;;
+ f) DATUM=`date +$OPTARG` ;;
t) touch=1 ;;
j) COMPRESS="bzip2 -9f" ; DOT_Z=".bz2" ;;
l) COMPRESS="" ;;