pick_server: Issue with item variable assignation #19

Closed
opened 2019-04-08 10:28:43 +02:00 by benpro · 1 comment
Contributor
/etc/cron.daily/zzz_evobackup: line 83: (08: value too great for base (error token is "08")

Here is a bash -x

+ MAIL=[redacted]
+ SERVERS=[redacted]:2224
+ SSH_CONNECT_TIMEOUT=30
++ uname
++ tr '[:upper:]' '[:lower:]'
+ SYSTEM=linux
+ mkdir -p -m 700 /home/backup
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin
+ export LANGUAGE=C
+ LANGUAGE=C
+ export LANG=C
+ LANG=C
+ umask 077
+ PIDFILE=/var/run/evobackup.pid
+ '[' -e /var/run/evobackup.pid ']'
+ echo 32099
+ trap 'rm -f /var/run/evobackup.pid' EXIT
+ uname -a
+ for addr in 8.8.8.8 www.evolix.fr travaux.evolix.net
+ mtr -r 8.8.8.8
+ traceroute -n 8.8.8.8
+ for addr in 8.8.8.8 www.evolix.fr travaux.evolix.net
+ mtr -r www.evolix.fr
+ traceroute -n www.evolix.fr
+ for addr in 8.8.8.8 www.evolix.fr travaux.evolix.net
+ mtr -r travaux.evolix.net
+ traceroute -n travaux.evolix.net
+ ps auwwx
+ '[' linux = linux ']'
+ netstat -taupen
+ dpkg -l
+ dpkg --get-selections
+ apt-cache dumpavail
+ n=0
+ server=
+ :
++ pick_server 0
++ increment=0
+++ echo [redacted]:2224
+++ wc -w
++ list_length=1
++ '[' 0 -ge 1 ']'
+++ hostname
+++ cut '-d ' -f1
+++ cksum
++ salt=4201609382
+++ date +%d
/etc/cron.daily/zzz_evobackup: line 83: (08: value too great for base (error token is "08")
+ server=
+ test 1 = 0
+ exit 2
+ rm -f /var/run/evobackup.pid

My SERVERS list contain only one server.

``` /etc/cron.daily/zzz_evobackup: line 83: (08: value too great for base (error token is "08") ``` Here is a bash -x ```{.text} + MAIL=[redacted] + SERVERS=[redacted]:2224 + SSH_CONNECT_TIMEOUT=30 ++ uname ++ tr '[:upper:]' '[:lower:]' + SYSTEM=linux + mkdir -p -m 700 /home/backup + PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin + export LANGUAGE=C + LANGUAGE=C + export LANG=C + LANG=C + umask 077 + PIDFILE=/var/run/evobackup.pid + '[' -e /var/run/evobackup.pid ']' + echo 32099 + trap 'rm -f /var/run/evobackup.pid' EXIT + uname -a + for addr in 8.8.8.8 www.evolix.fr travaux.evolix.net + mtr -r 8.8.8.8 + traceroute -n 8.8.8.8 + for addr in 8.8.8.8 www.evolix.fr travaux.evolix.net + mtr -r www.evolix.fr + traceroute -n www.evolix.fr + for addr in 8.8.8.8 www.evolix.fr travaux.evolix.net + mtr -r travaux.evolix.net + traceroute -n travaux.evolix.net + ps auwwx + '[' linux = linux ']' + netstat -taupen + dpkg -l + dpkg --get-selections + apt-cache dumpavail + n=0 + server= + : ++ pick_server 0 ++ increment=0 +++ echo [redacted]:2224 +++ wc -w ++ list_length=1 ++ '[' 0 -ge 1 ']' +++ hostname +++ cut '-d ' -f1 +++ cksum ++ salt=4201609382 +++ date +%d /etc/cron.daily/zzz_evobackup: line 83: (08: value too great for base (error token is "08") + server= + test 1 = 0 + exit 2 + rm -f /var/run/evobackup.pid ``` My SERVERS list contain only one server.
jlecour was assigned by benpro 2019-04-08 10:28:43 +02:00
benpro added the
bug
label 2019-04-08 10:29:39 +02:00
benpro added a new dependency 2019-04-08 10:40:11 +02:00
Owner

The fix is even easier and I forgot to use it here :/

We just need to format the date with %e instead of %d.

I've applied the fix in 02a83c1a76

The fix is even easier and I forgot to use it here :/ We just need to format the date with `%e` instead of `%d`. I've applied the fix in 02a83c1a761b7e61ea43d7436e4c5aee00660dfa
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: evolix/evobackup#19
No description provided.