By the way, it doesn't necessarily have to be bash. Upon looking further, a lot of shells support the `local` keyword, even though it's not required by the POSIX standard. Plain ksh, however, does not :(
On Monday, July 27, 2020, Reid Wahl <[email protected]> wrote: > Hi, Gabriele. The `local` keyword is a bash built-in and not available in some other shells (e.g., ksh). It's used in `have_binary()`, so it's causing `check_binary(/usr/gnu/bin/awk)` to fail. It's also causing all the "local: not found" errors. I just reproduced it to make sure. > > check_binary () { > if ! have_binary "$1"; then > if [ "$OCF_NOT_RUNNING" = 7 ]; then > # Chances are we have a fully setup OCF environment > ocf_exit_reason "Setup problem: couldn't find command: $1" > else > echo "Setup problem: couldn't find command: $1" > fi > exit $OCF_ERR_INSTALLED > fi > } > > have_binary () { > if [ "$OCF_TESTER_FAIL_HAVE_BINARY" = "1" ]; then > false > else > local bin=`echo $1 | sed -e 's/ -.*//'` > test -x "`which $bin 2>/dev/null`" > fi > } > Is bash available on your system? > On Mon, Jul 27, 2020 at 8:34 AM Gabriele Bulfon <[email protected]> wrote: >> >> Hello, >> >> after configuring crm for IP automatic configuration, I stumbled upon a problem with the IPaddr utiliy that I don't understand: >> >> IPaddr(xstha2_san0_IP)[10439]: 2020/07/27_17:26:17 ERROR: Setup problem: couldn't find command: /usr/gnu/bin/awk >> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished: xstha2_san0_IP_start_0:10439:stderr [ /usr/lib/ocf/resource.d/heartbeat/IPaddr[71]: local: not found [No such file or directory] ] >> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished: xstha2_san0_IP_start_0:10439:stderr [ /usr/lib/ocf/resource.d/heartbeat/IPaddr[354]: local: not found [No such file or directory] ] >> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished: xstha2_san0_IP_start_0:10439:stderr [ /usr/lib/ocf/resource.d/heartbeat/IPaddr[355]: local: not found [No such file or directory] ] >> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished: xstha2_san0_IP_start_0:10439:stderr [ /usr/lib/ocf/resource.d/heartbeat/IPaddr[356]: local: not found [No such file or directory] ] >> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished: xstha2_san0_IP_start_0:10439:stderr [ ocf-exit-reason:Setup problem: couldn't find command: /usr/gnu/bin/awk ] >> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished: xstha2_san0_IP_start_0:10439:stderr [ /usr/lib/ocf/resource.d/heartbeat/IPaddr[185]: local: not found [No such file or directory] ] >> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished: xstha2_san0_IP_start_0:10439:stderr [ /usr/lib/ocf/resource.d/heartbeat/IPaddr[186]: local: not found [No such file or directory] ] >> Jul 27 17:26:17 [10258] lrmd: info: log_finished: finished - rsc:xstha2_san0_IP action:start call_id:22 pid:10439 exit-code:5 exec-time:91ms queue-time:0ms >> >> It says it cannot find /usr/gnu/bin/awk but this is absolutely not true! >> >> sonicle@xstorage1:/sonicle/home# ls -l /usr/gnu/bin/awk >> -r-xr-xr-x 1 root bin 881864 Jun 1 12:25 /usr/gnu/bin/awk >> >> sonicle@xstorage1:/sonicle/home# file /usr/gnu/bin/awk >> /usr/gnu/bin/awk: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information available >> >> what may be happening?? >> >> Thanks! >> Gabriele >> >> >> >> >> >> >> Sonicle S.r.l. : http://www.sonicle.com >> Music: http://www.gabrielebulfon.com >> Quantum Mechanics : http://www.cdbaby.com/cd/gabrielebulfon >> _______________________________________________ >> Manage your subscription: >> https://lists.clusterlabs.org/mailman/listinfo/users >> >> ClusterLabs home: https://www.clusterlabs.org/ > > > -- > Regards, > > Reid Wahl, RHCA > Software Maintenance Engineer, Red Hat > CEE - Platform Support Delivery - ClusterHA -- Regards, Reid Wahl, RHCA Software Maintenance Engineer, Red Hat CEE - Platform Support Delivery - ClusterHA
_______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/
