Difference between revisions of "Dash as /bin/sh"

From ArchWiki
Jump to: navigation, search
m (Common places to check: pwd may not be /)
(Initscript status: seems to happen with init only)
Line 39: Line 39:
 
* The FD checks with {{codeline|test -t}} in {{filename|/etc/rc.d/functions}} do not work correctly with dash, breaking colored output as a result. See http://bugs.archlinux.org/task/19551?project=1&order=id&sort=desc (the patch does not address this issue in particular).
 
* The FD checks with {{codeline|test -t}} in {{filename|/etc/rc.d/functions}} do not work correctly with dash, breaking colored output as a result. See http://bugs.archlinux.org/task/19551?project=1&order=id&sort=desc (the patch does not address this issue in particular).
 
:* Try using {{codeline|test(1)}} instead of the dash builtin?
 
:* Try using {{codeline|test(1)}} instead of the dash builtin?
 +
:* Is the problem specific to calls involving {{codeline|init(1)}}?

Revision as of 05:30, 21 May 2010

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Dash as /bin/sh#)

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Dash as /bin/sh#)

This article is for those who want to help dash become the new Template:Filename.

From http://article.gmane.org/gmane.linux.arch.devel/11418:

Identifying bashisms

Install Template:Package AUR with an AUR helper.

Common places to check

$ find {,/usr}/bin -type f \
    -exec grep -l -- '^#!/bin/sh' {} \; \
    -exec checkbashisms -f -p {} +
  • Package install scripts:
$ find /var/lib/pacman/local -mindepth 2 -type f -name install \
    -exec checkbashisms -f -p {} + 2>&1 |\
    grep -v -e '^you may get strange results' \
            -e 'does not appear to have a #! interpreter line;$'
  • Initscripts and daemons:
$ find \
    /etc/rc.{conf,d,local{,.shutdown},multi,shutdown,single,sysinit} -type -f \
    -exec checkbashisms -f -p {} + 2>&1 |\
    grep -v -e '^you may get strange results' \
            -e 'does not appear to have a #! interpreter line;$'

Initscript status