[Drbd-dev] crm-fence-peer.sh missing shell expansion
Roland Kammerer
roland.kammerer at linbit.com
Fri May 8 10:03:26 CEST 2015
On Thu, May 07, 2015 at 11:55:17PM -0500, Justin Pryzby wrote:
> There are several instances of unexpanded variables in here:
>
> sleep $(( net_hickup_time - SECONDS ))
> reboot_timeout=$(( reboot_timeout + SECONDS ))
> echo WARNING "${extra_msg}going to reboot -f in $(( reboot_timeout - SECONDS )) seconds! To cancel: kill $$"
> if out=$( crmadmin -t $(( cibtimeout * 200 )) -S $DRBD_PEER ) \
Could you be a bit more precise where you _exactly_ see the problem,
please? "Several" does not help a bash n00b like me. Do you mean the '$'
is missing for example for 'SECONDS'?
If so, that isn't a problem:
----------8<----------8<----------
#!/bin/bash
FOO=42
BAR=23
echo $(( FOO - BAR ))
----------8<----------8<----------
Which will echo 19...
Regards, rck
More information about the drbd-dev
mailing list