projects
/
matthijs
/
upstream
/
backupninja-vserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backupninja: do not assume English locale when using date (Closes: #465837)
[matthijs/upstream/backupninja-vserver.git]
/
src
/
backupninja.in
diff --git
a/src/backupninja.in
b/src/backupninja.in
index 47630f282dc01572830e9b79d0ee5ba2159442b5..6dee3b6163c4920a06e34f95c0e3ebe831277272 100755
(executable)
--- a/
src/backupninja.in
+++ b/
src/backupninja.in
@@
-98,7
+98,7
@@
function printmsg() {
function logmsg() {
if [ -w "$logfile" ]; then
function logmsg() {
if [ -w "$logfile" ]; then
- echo -e `date "+%h %d %H:%M:%S"` "$@" >> $logfile
+ echo -e `
LC_ALL=C
date "+%h %d %H:%M:%S"` "$@" >> $logfile
fi
}
fi
}
@@
-200,9
+200,9
@@
function toint() {
# we grab the current time once, since processing
# all the configs might take more than an hour.
# we grab the current time once, since processing
# all the configs might take more than an hour.
-nowtime=`date +%H`
-nowday=`date +%d`
-nowdayofweek=`date +%A`
+nowtime=`
LC_ALL=C
date +%H`
+nowday=`
LC_ALL=C
date +%d`
+nowdayofweek=`
LC_ALL=C
date +%A`
nowdayofweek=`tolower "$nowdayofweek"`
function isnow() {
nowdayofweek=`tolower "$nowdayofweek"`
function isnow() {
@@
-561,7
+561,7
@@
if [ $doit == 1 ]; then
previous=""
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
previous=""
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
- if [ "$backuploc" != "$previous" ]; then
+ if [ "$backuploc" != "$previous"
-a -n "$backuploc"
]; then
df -h "$backuploc"
previous="$backuploc"
fi
df -h "$backuploc"
previous="$backuploc"
fi