Bug 158540 - net-misc/dhcp-3.0.5 - dhclient-script requires /bin/bash
|
Bug#:
158540
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: minor
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: uberlord@gentoo.org
|
Reported By: qb4w0p7r02@sneakemail.com
|
|
Component: Core system
|
|
|
URL:
|
|
Summary: net-misc/dhcp-3.0.5 - dhclient-script requires /bin/bash
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-12-19 05:56 0000
|
The script shebang is
#!/bin/bash
and should be
#!/bin/sh
Otherwise, if bash isn't installed (as is generally the case on embedded
builds) dhclient fails with "file not found"
Not a biggie, but I thought you might like it logged.
Reopen with exact ebuild name and version; assuming that everyone uses some
weirdo busybox stuff plain doesn't work... No idea what's this about.
sorry. package is net-misc/dhcp-3.0.5
file is /sbin/dhclient-script
> assuming that everyone uses some weirdo busybox stuff plain doesn't work...
Charmed, I'm sure.
The script starts with "#!/bin/bash" which will break on any system that
doesn't have bash installed. On the other hand "#!/bin/sh" should work for
anything that's Bourne shell based.
(In reply to comment #0)
> Otherwise, if bash isn't installed (as is generally the case on embedded
> builds) dhclient fails with "file not found"
That's a fair point, but on on embedded systems then udhcpc or dhcpcd would be
used as ISC's dhcp is very bloated :)
# ls -l /sbin/{dhcpcd,dhclient,pump,udhcp*}
-rwxr-xr-x 1 root root 358640 2006-11-06 09:29 /sbin/dhclient
-rwxr-xr-x 1 root root 38312 2006-12-19 12:01 /sbin/dhcpcd
-rwxr-xr-x 1 root root 60216 2006-06-16 16:39 /sbin/pump
lrwxrwxrwx 1 root root 6 2006-07-25 21:49 /sbin/udhcpc -> udhcpd
-rwxr-xr-x 1 root root 27672 2006-07-25 21:49 /sbin/udhcpd
(In reply to comment #2)
> The script starts with "#!/bin/bash" which will break on any system that
> doesn't have bash installed. On the other hand "#!/bin/sh" should work for
> anything that's Bourne shell based.
Not entirely accurate - if bash is invoked by #!/bin/sh then it turns off all
non POSIX functions, which is a fair bit. Luckily dhclient-script doesn't use
any of that, so I'll update it in one of the ~ARCH versions.
Fixed in dhcp-3.0.5 and 3.1.0_alpha2