[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Additional options for udhcpc
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2008-12-30 10:33:56
Message-ID: 200812301133.56361.vda.linux () googlemail ! com
[Download RAW message or body]

On Tuesday 30 December 2008 06:17, Marcel Holtmann wrote:
> Hi Denys,
> 
> > > so I was working on using udhcpc for a Connection Manager (ConnMan)
> > > which uses udhcpc without any user interaction. I am missing two options
> > > that dhclient currently provides:
> > > 
> > > 1) udhcpc is really talky and it would be nice to have a --quiet switch
> > > to discard all bb_info_msg outputs.
> > 
> > udhcpc >/dev/null 2>&1 ?
> 
> I know that this works in shell scripts, but that is not my goal. Right
> now I am calling udhcpc from a daemon and I don't wanna bother with
> redirecting stdout and stderr since I don't care about any of it. For me
> it is just simpler to tell udhcpc to not print anything.

That would be a featuritis.

Tomorrow someone will ask to add a capability to log to a file:
"please add --logfile option". Then another user will request
"I want log rotation, --logdir_with_rotation please?" etc.

This is a wrong design to try to cram all this stuff into udhcp.
These capabilities already exist, and provided by shell.
If you need to call udhcpc from another program,
just call a suitably written udhcpc.sh which will do
the redirection etc.

> > > 2) providing environment variables via command line that are later on
> > > handed over to the script. Currently the script only inherits HOME and
> > > PATH.
> > 
> > Try this patch. It makes udhcpc to pass all environment variables
> > to the script, so just arrange udhcpc itself to be started
> > with correct environment...
> 
> Personally I prefer to have full control over which environment
> variables are passed to the script.

That *is* the fullest possible control. Who is in full control
of the environment to pass if not the calling program?
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic