On Mon, Jan 24, 2011 at 06:11:17PM +0100, Michele Codutti wrote:
> Hi Florian, i've looked for bashism into the debian package (1.0.3-3.1)
These things need to be check against _upstream repositories_ always.
> and this is the result:
> $ for i in * .*; do checkbashisms $i 2>&1 |grep -v "is already a bash
> script; skipping" ; done
> possible bashism in AudibleAlarm line 84 (echo -e):
> echo -ne "\a" > /dev/console
> possible bashism in CTDB line 333 (should be 'b = a'):
> [ "$OCF_RESKEY_ctdb_logfile" == "syslog" ] && log_option="--syslog"
> possible bashism in CTDB line 359 (brace expansion, should be $(seq a
> b)):
> for i in {1..30}; do
> possible bashism in Delay line 160 ([^] should be [!]):
> echo $i |grep -v [^0-9.] |grep -q -v [.].*[.]
> script IPv6addr does not appear to have a #! interpreter line;
> you may get strange results
> possible bashism in SAPDatabase line 540 (should be >word 2>&1):
> eval "$VALUE" >& /dev/null
> possible bashism in SAPInstance line 383 (should be >word 2>&1):
> eval "$VALUE" >& /dev/null
> possible bashism in anything line 129 (let ...):
> let "i++"
> possible bashism in eDir88 line 190 (let ...):
> let CNT=$CNT+1
> possible bashism in eDir88 line 322 (declare):
> declare rc=$OCF_SUCCESS
> possible bashism in oracle line 234 (should be 'b = a'):
> if [ x == "x$ORACLE_HOME" ]; then
> possible bashism in oracle line 238 (should be 'b = a'):
> if [ x == "x$ORACLE_OWNER" ]; then
> possible bashism in oracle line 386 (should be 'b = a'):
> if [ "x$dumpdest" == x -o ! -d "$dumpdest" ]; then
> possible bashism in oracle line 390 (local -opt):
> local -i fcount=`ls -rt $dumpdest | wc -l`
> possible bashism in oracle line 393 (local -opt):
> local -i fcount2=`ls -rt $dumpdest | wc -l`
> possible bashism in oralsnr line 161 (should be 'b = a'):
> if [ x == "x$ORACLE_HOME" ]; then
> possible bashism in oralsnr line 165 (should be 'b = a'):
> if [ x == "x$ORACLE_OWNER" ]; then
> script .ocf-binaries does not appear to have a #! interpreter line;
> you may get strange results
> script .ocf-directories does not appear to have a #! interpreter line;
> you may get strange results
> script .ocf-returncodes does not appear to have a #! interpreter line;
> you may get strange results
> script .ocf-shellfuncs does not appear to have a #! interpreter line;
> you may get strange results
> possible bashism in .ocf-shellfuncs line 68 ($RANDOM):
> local rnd="$RANDOM"
>
> It seems that there are bunch of agents (AudibleAlarm, CTDB, Delay,
> IPv6addr, SAPDatabase, SAPInstance, anything, eDir88, oracle, oralsnr)
> that contain bashisms and that have the "#!/bin/sh" interpreter line.
Nope. eDir88 has been converted to bash,
IPv6addr is a binary compiled from C source,
all others have been fixed quite a while ago,
as Florian told you in the mail you even quote below.
> but what concern me most is the .ocf-shellfuncs that is called by almost
> all agents (POSIX or not) contain a well known bashism ($RANDOM).
If you had made at least the effort to check the complaints, you might
even have noticed that what "concerns you most" was done with full
conciousness:
ocf_maybe_random() {
local rnd="$RANDOM"
# Something sane-ish in case a shell doesn't support $RANDOM
[ -n "$rnd" ] || rnd=$$
echo $rnd
}
>
> Il giorno mar, 18/01/2011 alle 11.43 +0100, Florian Haas ha scritto:
> > All the agents that declare their interpreter to be /bin/sh have had
> > any
> > bashisms eradicated for the Debian squeeze release. So yes these will
> > work on a system where /bin/sh links to dash.
There.
So thank you very much for trying to help,
but this was a fail.
Maybe next time ;-)
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems