Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 191859

Summary: sys-fs/udev doesn't work with a POSIX sh
Product: Gentoo Linux Reporter: Benoit Izac <benoit>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Benoit Izac 2007-09-09 17:27:59 UTC
modprobe.sh and move_tmp_persistent_rules.sh are not sh POSIX scripts because both include /etc/init.d/functions.sh which is a bash script.

Reproducible: Always

Steps to Reproduce:
1. use a POSIX shell for /bin/sh (ie dash)
2. reboot


Actual Results:  
lot of errors when loading udev :
/etc/init.d/functions.sh: 7: [[: not found
/etc/init.d/functions.sh: 10: declare: not found
/etc/init.d/functions.sh: 11: declare: not found
/etc/init.d/functions.sh: 87: [[: not found
S/etc/init.d/functions.sh: 87: [[: not found
/etc/init.d/functions.sh: 96: [[: not found
/etc/init.d/functions.sh: 104: [[: not found
/etc/init.d/functions.sh: 306: Syntax error: Bad substitution


Expected Results:  
normal starting without error.

To close this bug, replace #!/bin/sh by #!/bin/bash in both modprobe.sh and move_tmp_persistent_rules.sh
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-09 17:39:58 UTC
So upgrade your baselayout, not an udev problem.
Comment 2 Benoit Izac 2007-09-09 18:40:12 UTC
It's not a problem with baselayout!

equery b /lib/udev/modprobe.sh 
[ Searching for file(s) /lib/udev/modprobe.sh in *... ]
sys-fs/udev-114 (/lib/udev/modprobe.sh)
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-09-09 18:51:21 UTC
functions.sh is provided by baselayout. Upgrade to baselayout-2, "problem" solved.
Comment 4 Benoit Izac 2007-09-09 19:19:52 UTC
It's not a solution for two reasons:
    - the problem still exists
    - baselayout-2 is masked

Is-it really a big difficulty to add two letters in two scripts?
Please tell me, next time I will save my time...
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-09-09 19:58:54 UTC
We don't support anything but /bin/bash as /bin/sh symlink on <baselayout-2

Please, leave the bug alone, there's no non-posix stuff in udev.