Return-Path: Delivered-To: apmail-hadoop-chukwa-user-archive@minotaur.apache.org Received: (qmail 22379 invoked from network); 15 Feb 2010 20:57:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2010 20:57:02 -0000 Received: (qmail 32201 invoked by uid 500); 15 Feb 2010 20:57:02 -0000 Delivered-To: apmail-hadoop-chukwa-user-archive@hadoop.apache.org Received: (qmail 32166 invoked by uid 500); 15 Feb 2010 20:57:02 -0000 Mailing-List: contact chukwa-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-user@hadoop.apache.org Delivered-To: mailing list chukwa-user@hadoop.apache.org Received: (qmail 32156 invoked by uid 99); 15 Feb 2010 20:57:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 20:57:02 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of asrabkin@gmail.com designates 209.85.222.174 as permitted sender) Received: from [209.85.222.174] (HELO mail-pz0-f174.google.com) (209.85.222.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 20:56:54 +0000 Received: by pzk4 with SMTP id 4so5735981pzk.5 for ; Mon, 15 Feb 2010 12:56:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kcajWbt9UsdT8qMAF7+KeH9lvNyR7VOI8P5SaXOUUZs=; b=xjAWLaLDWTc5axh/rkDZnsiXMX8DGjK4+ogKiAS8k7pql6AcX+zeft+5Dm3+2BbXqk I38JKGvZ+jHUCLP6SapbwztUCe8g/DK6Y8eomP+0xIKHY2gfDt3W/e7iOZ7fuINZ1xWl 8Ewg9W7Axa5WVx21pyM1MbfnqwnpLr1kJ6UYI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ahiuCEXKX+0HeIcresyt7kLfrXnTYkGO8xC/RyinjHZtSPWUBJ3hhjkUC596ps5nLS EMbr603C7sB8DmlyzVVAyoCGzjLFXxRldvvVcN/15UHsb/kOowQnVgTZ87yPvOBSxILT mmKFyVmY6D8B8lQgRChn2WXYMepIy/B5K51Rs= MIME-Version: 1.0 Received: by 10.142.2.26 with SMTP id 26mr3715608wfb.231.1266267391152; Mon, 15 Feb 2010 12:56:31 -0800 (PST) In-Reply-To: <9d1281711002150807p2725b321ta437e6fc0ccb5ca2@mail.gmail.com> References: <9d1281711002150807p2725b321ta437e6fc0ccb5ca2@mail.gmail.com> Date: Mon, 15 Feb 2010 12:56:31 -0800 Message-ID: <39b0afc01002151256o1e134eah4a0060d050afabf4@mail.gmail.com> Subject: Re: Some scripts in bin/ folder require bash, call sh From: Ariel Rabkin To: chukwa-user@hadoop.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Yup. That's a bug. We've opened https://issues.apache.org/jira/browse/CHUKWA-453 to track progress in fixing it. --Ari 2010/2/15 Guillermo P=C3=A9rez : > 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 -=E2=84=AC=E1=B8=AD=E1=B9=A9=E1=B8=A9=C3=B8- > :wq > --=20 Ari Rabkin asrabkin@gmail.com UC Berkeley Computer Science Department