You are not logged in.
Same thing happens with official bash (not the busybox version). This is the output from running it on Fedora 29:
$ ./xsibackup --help
./xsibackup: line 490: syntax error near unexpected token `;&'
./xsibackup: line 490: `DEBUGINFO="${DEBUGINFO}<br>• KEY: $SSHOPTS"'
$ bash --version
GNU bash, version 4.4.23(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Offline
If you copy out and run the "DEBUGINFO=" line by itself in a shell, it works. Yet, in the context of the script, it fails. My guess is that with all the fancy stuff going on, newer versions of bash are getting confused somewhere prior to line 490, and incorrectly parsing once it gets to 490, causing the error. Perhaps they *fixed* a bug awhile back, and that fix might have exposed a latent syntax issue in the script.
EDIT: [url=https://www.shellcheck.net/]Shell Script Checker[/url] Thinks the first double quote in that line is an end quote, not a start quote.
EDIT2: Commenting out line 200, and uncommenting 201 at least allows the script to run without bash syntax errors. Something about line 200 is suspect:
Line 200:
VARVAL="${VARVAL//"/\"}"
^-- SC1078: Did you forget to close this double quoted string?
Last edited by isombrinia (2019-06-26 18:22:46)
Offline
[quote=isombrinia]
Line 200:
VARVAL="${VARVAL//"/\"}"
^-- SC1078: Did you forget to close this double quoted string?[/quote]
Good catch!
If I change the line ( in my version it is line 196 btw) to this:
VARVAL="${VARVAL//\"/\"}"
Then the script runs again!
Offline
Running it in a regular Bash should not make much sense, in this case might have helped you to detect this, though. Busybox shell is not Bash, but Ash, which is a much more primitive shell language closer to the original Bourne Shell.
It would be rare that we had not detected any gross syntax error for years. It would make sense that the syntax parser thinks the second double quote is the end of the string though, but changing it to this:
VARVAL="${VARVAL//\"/\"}"
leaves the line without effect, so in any case that should be:
VARVAL="${VARVAL//\"/\\"}"
As the function of that type of code is to escape double quotes. Sed would have probably done it better here, we'll revise it soon, thank you for the feedback.
We'll take a look at this and eventually fix it. Nevertheless the new XSIBackup version has been released as a Beta and will be our main branch of development for the next years, XSIBackup as a script will probably be kept as the free version of our software.
Offline
We have been taking a look at this issue again.
It's clear that the double quote inside the curly brace expansion was causing the bash parser to behave oddly. It's also obvious that all previous bash interpreters didn't care much about this fact. Double quotes are treated differently inside subprocess expansion in between parentheses too, and it has been doing the same with curly brace expansion so far.
We have solved this by just using the sed call above this line to escape double quotes inside variable values. This is not very likely to be found, but still we'll keep it just in case.
We will now check functioning thoroughly before considering this a definitive solution, but you may use it to workaround this issue.
The above mentioned line
VARVAL="${VARVAL//"/\"}"
Is at line 300 in version 11.2.3
Right above that line you can find this
VARVAL="$( echo $block | awk -F "=" '{print $2}' | sed -e 's/^ *//g' -e 's/ *$//g' )"
We just extended that line adding an additional sed code block to perform the same task that the old curly brace expansion. So just add the new block and delete or comment out the faulty line.
VARVAL="$( echo $block | awk -F "=" '{print $2}' | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/"/\"/g' )"
Offline
Can 11.2.3 be used in trial mode indefinitely? The only free version I've seen is 11.0.1. Thanks!
Offline
There isn't any such thing as version 11.2.3 in trial mode. Only trial version of XSIBACKUP-PRO is 11.0.1.
Any 11.2.3 version is a PRO version, which can only be downloaded after being licensed.
In any case, this is not the thread to pose such questions.
Offline
I asked only because you referenced 11.2.3, and this is the forum for the free version. I was confused.
Offline
We just released XSIBACKUP-FREE 11.2.4, it's available for download.
It is compatible with ESXi 6.7.0 Update 2
Offline
Thank you. The new version 11.2.4 appears to be running OK on my 6.7.0 u2 system.
Offline
O.K., thank you for the feedback
Offline
Just a quick question, I downloaded the new version of XSIBackup Free (11.2.5) and noticed that it contains a package called XSIBACKUP-PRO.zip (previous versions were called XSIBACKUP-FREE.zip), is this correct or may I encounter issues as a free user?
Rather asking in advance before encountering any issues
Thanks in advance
Last edited by HigH_HawK (2019-07-04 07:52:24)
Offline
Just an error naming things, it's indeed Free version
Offline
Thank you for the clarification. Going to test it now
Offline
We already fixed that name and republished as same version
Offline