Page 1 of 1

BUG - restore_xi.sh

Posted: Thu Oct 11, 2012 8:52 pm
by niebais
OS: Centos 6
Nagios Version: 2012R1.0

I am running the restore_xi.sh script and am encountering this error: arch: invalid option -- 'm'
Try `arch --help' for more information.
Error detecting architecture.

It looks like this feature is broken with Nagios XI 2012. The main problem is it is having problems determining the architecture of the system now with the "arch" command. I'll see if I can submit a fix.

Re: BUG - restore_xi.sh

Posted: Fri Oct 12, 2012 9:56 am
by mguthrie
Bug confirmed. We'll take a look as well. Thanks for the heads up!

Re: BUG - restore_xi.sh

Posted: Thu Oct 18, 2012 1:18 pm
by nagiosadmin42
We're on CentOS 6.3 and 2012R1.0 and were able to work around it, the problem is with the architecture case statement. I don't have the script in front of me, so from memory I believe it was that the arch command doesn't need the "-m" option, and the case statement's variable was incorrect. Change the following lines:

arch=$(arch -m)
case arch

to:
arch=$(arch)
case "$arch"

That should do it.

Re: BUG - restore_xi.sh

Posted: Thu Oct 18, 2012 1:48 pm
by mguthrie
Thanks for the heads up. We've got this fixed in SVN for the next release.