Skip to Content.
Sympa Menu

sm-grimoire-bugs - [SM-Grimoire-Bugs] [Bug 13702] New: bash dependent init scripts masquerading as /bin/sh compatible

sm-grimoire-bugs AT lists.ibiblio.org

Subject: SourceMage Grimoire Bug List

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-grimoire-bugs AT lists.ibiblio.org
  • Subject: [SM-Grimoire-Bugs] [Bug 13702] New: bash dependent init scripts masquerading as /bin/sh compatible
  • Date: 11 Apr 2007 17:07:05 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=13702

Summary: bash dependent init scripts masquerading as /bin/sh
compatible
Product: Codex
Version: test grimoire
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: FUNCTIONS
AssignedTo: sm-grimoire-bugs AT lists.ibiblio.org
ReportedBy: sqweek AT gmail.com


A bunch of our init scripts use bashisms but have a hash-bang line of
#!/bin/sh. Of course 99% of users have /bin/sh -> bash so this mostly goes
unnoticed. The reason you're hearing this from me is because I have /bin/sh
-> dash.

Anyway, /etc/init.d/smgl_functions contains bashisms, and it is sourced from
/etc/init.d/smgl_init - most init scripts source one of these. Of the init
scripts claiming #!/bin/sh, I found two that look fine:

/var/lib/sorcery/codex/test/gnome1-libs/gdm/init.d/gdm.sh:1:#!/bin/sh
/var/lib/sorcery/codex/test/http/pglogd/init.d/pglogd.sh:1:#!/bin/sh

And here's the rest, that claim #!/bin/sh but depend on bash:

/var/lib/sorcery/codex/test/cluster/openmosix-tools/init.d/openmosix:1:#!/bin/sh
/var/lib/sorcery/codex/test/cluster/openmosixview/init.d/mosstatd.sh:1:#!/bin/sh
/var/lib/sorcery/codex/test/cluster/openmosixview/init.d/openmosixcollector:1:#!/bin/sh
/var/lib/sorcery/codex/test/collab/openldap/init.d/slapd:1:#!/bin/sh
/var/lib/sorcery/codex/test/collab/webmin/init.d/webmin:1:#!/bin/sh
/var/lib/sorcery/codex/test/crypto/openssh/init.d/sshd:1:#!/bin/sh
/var/lib/sorcery/codex/test/database/mysql/init.d/mysql:1:#!/bin/sh
/var/lib/sorcery/codex/test/disk/cpqarrayd/init.d/cpqarray:1:#!/bin/sh
/var/lib/sorcery/codex/test/e/entrance/init.d/entrance:1:#!/bin/sh
/var/lib/sorcery/codex/test/gnome1-libs/gdm/init.d/gdm.sh:1:#!/bin/sh
/var/lib/sorcery/codex/test/http/pglogd/init.d/pglogd.sh:1:#!/bin/sh
/var/lib/sorcery/codex/test/http/webcleaner/init.d/webcleaner:1:#!/bin/sh
/var/lib/sorcery/codex/test/i18n/canna/init.d/canna:1:#!/bin/sh
/var/lib/sorcery/codex/test/i18n/freewnn/init.d/jserver:1:#!/bin/sh
/var/lib/sorcery/codex/test/i18n/scim/init.d/scim:1:#!/bin/sh
/var/lib/sorcery/codex/test/kde-core/kdebase/init.d/kdm:1:#!/bin/sh
/var/lib/sorcery/codex/test/kde4/kdebase4/init.d/kdm4:1:#!/bin/sh
/var/lib/sorcery/codex/test/kernels/hibernate-script/init.d/hibernate-cleanup:1:#!/bin/sh
/var/lib/sorcery/codex/test/kernels/hotplug/init.d/hotplug:1:#!/bin/sh
/var/lib/sorcery/codex/test/mail/anubis/init.d/anubis:1:#!/bin/sh
/var/lib/sorcery/codex/test/mail/courier-authlib/init.d/courier-authlib:1:#!
/bin/sh
/var/lib/sorcery/codex/test/mail/courier-imap/init.d/courier-imap:1:#! /bin/sh
/var/lib/sorcery/codex/test/mail/courier-imap/init.d/courier-imap-ssl:1:#!
/bin/sh
/var/lib/sorcery/codex/test/mail/courier-imap/init.d/courier-pop:1:#! /bin/sh
/var/lib/sorcery/codex/test/mail/courier-imap/init.d/courier-pop-ssl:1:#!
/bin/sh
/var/lib/sorcery/codex/test/mail/courier/init.d/courier-imap:1:#! /bin/sh
/var/lib/sorcery/codex/test/mail/courier/init.d/courier-imap-ssl:1:#! /bin/sh
/var/lib/sorcery/codex/test/mail/courier/init.d/courier-mta:1:#! /bin/sh
/var/lib/sorcery/codex/test/mail/courier/init.d/courier-mta-ssl:1:#! /bin/sh
/var/lib/sorcery/codex/test/mail/courier/init.d/courier-pop:1:#! /bin/sh
/var/lib/sorcery/codex/test/mail/courier/init.d/courier-pop-ssl:1:#! /bin/sh
/var/lib/sorcery/codex/test/mail/popfile/init.d/popfile:1:#!/bin/sh
/var/lib/sorcery/codex/test/mobile/apmd/init.d/apmd:1:#!/bin/sh
/var/lib/sorcery/codex/test/mobile/wifi-radar/init.d/wifi-radar:1:#!/bin/sh
/var/lib/sorcery/codex/test/net/dhcdbd/init.d/dhcdbd:1:#!/bin/sh
/var/lib/sorcery/codex/test/net/pikt/init.d/piktsvc:1:#!/bin/sh
/var/lib/sorcery/codex/test/net/queue/init.d/queue:1:#!/bin/sh
/var/lib/sorcery/codex/test/security/iplog/init.d/iplog:1:#!/bin/sh
/var/lib/sorcery/codex/test/security/iplog/init.d/iplog.sh:1:#!/bin/sh
/var/lib/sorcery/codex/test/security/nessus-core/init.d/smgl-nessusd:1:#!/bin/sh
/var/lib/sorcery/codex/test/security/pks/init.d/pks:1:#!/bin/sh
/var/lib/sorcery/codex/test/security/scanlogd/init.d/scanlogd:1:#!/bin/sh
/var/lib/sorcery/codex/test/smgl/init.d/init.d/devices:1:#!/bin/sh
/var/lib/sorcery/codex/test/smgl/init.d/init.d/mountall.sh:1:#!/bin/sh
/var/lib/sorcery/codex/test/smgl/init.d/init.d/mountroot.sh:1:#!/bin/sh
/var/lib/sorcery/codex/test/utils/acpid/init.d/acpid:1:#!/bin/sh
/var/lib/sorcery/codex/test/utils/bluez-utils/init.d/bluetooth:1:#!/bin/sh
/var/lib/sorcery/codex/test/utils/kbd/init.d/log2cons:1:#!/bin/sh
/var/lib/sorcery/codex/test/utils/lshwd/init.d/lshwd:1:#!/bin/sh
/var/lib/sorcery/codex/test/utils/smartmontools/init.d/smartd:1:#!/bin/sh
/var/lib/sorcery/codex/test/x11/gkrellm2/init.d/gkrellmd:1:#!/bin/sh
/var/lib/sorcery/codex/test/x11/slim/init.d/slim:1:#!/bin/sh

The most easiest and most obvious fix is a mass s,#!/bin/sh,#!/bin/bash,. The
alternative would be to remove all bashisms from the init scripts themselves
and
supporting scripts :).

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



  • [SM-Grimoire-Bugs] [Bug 13702] New: bash dependent init scripts masquerading as /bin/sh compatible, bugzilla-daemon, 04/11/2007

Archive powered by MHonArc 2.6.24.

Top of Page