
http://bugzilla.novell.com/show_bug.cgi?id=626629 http://bugzilla.novell.com/show_bug.cgi?id=626629#c4 Torsten Foertsch <torsten.foertsch@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|torsten.foertsch@gmx.net | --- Comment #4 from Torsten Foertsch <torsten.foertsch@gmx.net> 2010-07-30 11:08:26 UTC --- to tell apart sh from bash (if they are linked) it will work. But dash and ash don't know about -t in read. Why do you read with a timeout here, anyway? In what cases can read from /proc/PID/cmdline take longer than a second? Also dash's read command does not stop reading at the NULL byte: 0 r2@opi ~/tmp$ cat ./x.sh #!/bin/dash read a r </proc/$$/cmdline echo "a: $a" echo "r: $r" 0 r2@opi ~/tmp$ ./x.sh a: /bin/dash./x.sh r: 0 r2@opi ~/tmp$ you see $a contains the whole cmdline, $r is empty. Now, I have restored the shebang line in /usr/sbin/Check to #!/bin/sh. Further, my /etc/profile now reads: .. if ! is=$(readlink /proc/$$/exe 2>/dev/null) ; then case "$0" in *pcksh) is=ksh ;; *) is=sh ;; esac fi case "$is" in */bash) is=bash read a r </proc/self/cmdline case "$a" in sh|-sh|*/sh) is=sh ;; esac unset a r ;; */ash) is=ash ;; */dash) is=ash ;; */ksh) is=ksh ;; */ksh93) is=ksh ;; */pdksh) is=ksh ;; */*pcksh) is=ksh ;; */zsh) is=zsh ;; */*) is=sh ;; esac .. This combination also works. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.