incubator-chukwa-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillermo Pérez <bi...@tuenti.com>
Subject Some scripts in bin/ folder require bash, call sh
Date Mon, 15 Feb 2010 16:07:32 GMT
Hi, I have noticed that some scripts in bin/ folder of the
distribution say to require /bin/sh to run, but in fact they require
bash because they use function for declaring functions:

$ grep -r function bin/
bin/agent.sh:function stop {
bin/demux.sh:function remove_cron {
bin/demux.sh:function add_cron {
bin/exec-data-loader.sh:function clean_up {
bin/hicc.sh:function stop {
bin/jettyCollector.sh:function stop {
bin/systemDataLoader.sh:function status {
bin/systemDataLoader.sh:function shutdown {

If you really use sh (or compatible dash) to execute them you get an
error. They require bash to work:
sh bin/agent.sh
bin/agent.sh: 24: function: not found

We should use #!/bin/bash as header on those scripts.

Regards

-- 
Guille -ℬḭṩḩø- <bisho@tuenti.com>
:wq

Mime
View raw message