Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158540 - net-misc/dhcp-3.0.5 - dhclient-script requires /bin/bash
Summary: net-misc/dhcp-3.0.5 - dhclient-script requires /bin/bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-19 05:56 UTC by Nick Fortune
Modified: 2006-12-20 04:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Fortune 2006-12-19 05:56:35 UTC
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.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-12-19 07:03:42 UTC
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.
Comment 2 Nick Fortune 2006-12-19 08:41:23 UTC
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.
Comment 3 Roy Marples (RETIRED) gentoo-dev 2006-12-19 09:05:33 UTC
(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
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-12-19 09:07:56 UTC
(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.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2006-12-20 04:36:17 UTC
Fixed in dhcp-3.0.5 and 3.1.0_alpha2