[Debian-ha-maintainers] Bug#581073: cluster-agents: bashism in /bin/sh script

Raphael Geissert atomo64 at gmail.com
Tue May 11 04:53:57 UTC 2010


Package: cluster-agents
Severity: important
Version: 1:1.0.3-3
User: debian-release at lists.debian.org
Usertags: goal-dash

Hello maintainer,

While performing an archive wide checkbashisms (from the 'devscripts' package)
check I've found your package containing a /bin/sh script making use
of a bashism.

checkbashisms' output:
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/anything line 129
> (let ...):
>			  let "i++"
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/SAPDatabase line 540
> (should be >word 2>&1):
>	eval "$VALUE" >& /dev/null
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/AudibleAlarm line 84
> (echo -e):
>		  echo -ne "\a" > /dev/console 
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/oracle line 234
> (should be 'b = a'):
>	  if [ x == "x$ORACLE_HOME" ]; then
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/oracle line 238
> (should be 'b = a'):
>	  if [ x == "x$ORACLE_OWNER" ]; then
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/oracle line 386
> (should be 'b = a'):
>	  if [ "x$dumpdest" == x -o ! -d "$dumpdest" ]; then
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/oracle line 390
> (local -opt):
>	  local -i fcount=`ls -rt $dumpdest | wc -l`
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/oracle line 393
> (local -opt):
>	  local -i fcount2=`ls -rt $dumpdest | wc -l`
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/eDir88 line 190 (let
> ...):
>	  let CNT=$CNT+1
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/eDir88 line 322
> (declare):
>     declare rc=$OCF_SUCCESS
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/CTDB line 333
> (should be 'b = a'):
>	  [ "$OCF_RESKEY_ctdb_logfile" == "syslog" ] && log_option="--syslog"
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/CTDB line 359 (brace
> expansion, should be $(seq a b)):
>		  for i in {1..30}; do
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/oralsnr line 161
> (should be 'b = a'):
>	  if [ x == "x$ORACLE_HOME" ]; then
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/oralsnr line 165
> (should be 'b = a'):
>	  if [ x == "x$ORACLE_OWNER" ]; then
> possible bashism in ./usr/lib/ocf/resource.d/heartbeat/SAPInstance line 380
> (should be >word 2>&1):
>	eval "$VALUE" >& /dev/null


Not using bash (or a Debian Policy compliant shell interpreter that doesn't
provide such an extra feature) as /bin/sh is likely to lead to errors or
unexpected behaviours. Please be aware that dash is now the default /bin/sh.

Hints about how to fix bashisms can be found at:
https://wiki.ubuntu.com/DashAsBinSh

If you still don't know how to fix the bashisms don't hesitate to reply to
this email, or tag the bug as 'help'.

Thank you,
Raphael Geissert





More information about the Debian-ha-maintainers mailing list