From: Roland Kammerer <roland.kammerer@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] crm-fence-peer.sh missing shell expansion
Date: Fri, 8 May 2015 10:03:26 +0200 [thread overview]
Message-ID: <20150508080325.GS1968@rck.sh> (raw)
In-Reply-To: <20150508045517.GA6131@telsasoft.com>
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
next prev parent reply other threads:[~2015-05-08 8:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 4:55 [Drbd-dev] crm-fence-peer.sh missing shell expansion Justin Pryzby
2015-05-08 8:03 ` Roland Kammerer [this message]
2015-05-08 15:09 ` Justin Pryzby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150508080325.GS1968@rck.sh \
--to=roland.kammerer@linbit.com \
--cc=drbd-dev@lists.linbit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.