PATCH: ifupdown.c, udhcpc, and standalone shell

Giuseppe Ciotta giuseppe at telvia.it
Wed Sep 27 16:15:47 UTC 2006


On Wed, Sep 27, 2006 at 05:00:21PM +0200, Denis Vlasenko wrote:
> Hmm.. In my personal opinion whole idea behind ifup is stupid.
> Executables should not decide which commands to run, it should
> be scriptable. As I said, I use runit - which is.
> 
> But I am not trying to change whole world, if there are users
> for ifup, okay, will try to make it work.
> 
> How do you propose to cleanly check that execute("foo bar baz");
> will be able to find and execute foo executable - without actually
> trying to execute it? "if /sbin/foo exists" is not a good check.
> --

What about adding a build option to decide what dhcp client to use and
the options/arguments needed to execute it?

something like:


CONFIG_FEATURE_IFUPDOWN_DHCP_CLIENT
	string "dhcp client to use"
	default "udhcpc"
	depends on CONFIG_IFUPDOWN
	help
	  Choose dhcp client to use (eg. pump/dhclient/udhcpc)

CONFIG_FEATURE_IFUPDOWN_DHCP_CLIENT_OPTIONS
	string "dhcp client options"
	default "-n -p /var/run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] [[-c %clientid%]]"
	depends on CONFIG_FEATURE_IFUPDOWN_DHCP_CLIENT
	help
	  Choose dhcp client options, you can use special variables like:
	  %hostname%, %iface%.. see interfaces(5) for details.

btw, what's the meaning of brackets around [[ -H %hostname% ]]?
-- 



More information about the busybox mailing list