dhclient-script, hooks, and changing the environment

martin f krafft madduck at debian.org
Thu Aug 7 02:41:39 UTC 2008


also sprach Brian May <bam at snoopy.debian.net> [2008.08.06.2242 -0300]:
> Packages that come to mind that want to alter the environment of it  
> parent are:
>
>    * ssh-agent

You have to eval the output, no?

>    * <http://modules.sourceforge.net/>

*horror* ! :)

Neither of those affect /etc/dhcp3/dhclient-*-hooks.d though...

> I guess you could also write a shell script to a temp file and
> then  source that. Not sure if this is any cleaner though.

The problem is that netconf has no dhclient-script anymore as it
parses dhclient REASONS directly and then proceeds to use e.g. IP
address and router stuff as if it had been gathered from /e/n/i.
Thus, hooks are execvp()'d from netconf directly. If I wanted to
allow hooks to modify the environment, I'd have to execvp()

  sh -c '. the_hook; env | while read line; do echo "ENVIRONMENT:$line'

and then parse that stuff out of stdout, which, to put it mildly, is
ASS. I'd really rather not.

-- 
 .''`.   martin f. krafft <madduck at debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
consciousness: that annoying time between naps.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/netconf-devel/attachments/20080806/5b008023/attachment.pgp 


More information about the netconf-devel mailing list