70-persistent-net.rules not created

jmscott at setex.ipcallback.com jmscott at setex.ipcallback.com
Sun Jan 10 22:01:25 PST 2010

On Sun, Jan 10, 2010 at 10:37:13PM -0600, Bruce Dubbs wrote:
> jmscott at setex.ipcallback.com wrote:
> > the standard output to /lib/udev/write_net_rules is 
> > caught and filtered by udevadm, so examining the env list to execve()
> > seemed a bit more direct.
> Where is standard output caught?  I don't see it. After options, udevadm 

libudev/libudev-util-private.c, util_run_program(), line 238.

from a causual reading of the source, looks like 
udevadm-test() eventually calls util_run_program() to invoke
/lib/udev/write_net_rules, which is where the standard output is massaged.
udev_device_get_properties_envp() sets up the environment for the execve()
call in util_run_program().

funny thing is i don't see any reference to char **environ, so i don't 
see any obvious way the unqualified, exported environment could get to 
the invocation of  /lib/udev/write_net_rules.
do the rules files need to explicitly mention the INTERFACE variable?

getting late ... i'm sure it's something simple.
mere matter of debugging.

> just calls udevadm-test(argc, argv).
> > adding a call to env in /lib/udev/write_net_rules has same result.
> > INTERFACE is not defined.
> > 
> >> If INTERFACE set before you call write_net_rules and not within the 
> > 
> > verified with a printf of getenv(INTERFACE) in main() of udevadm.
> That's your problem, but I don't know how to fix it.
> Can you try:
> char* e = *environ;
> while ( *e != NULL )
> {
>    printf( "%s\n", *e );
>    e++;
> }

main: INTERFACE=/sys/class/net/eth0
main: TERM=xterm
main: OLDPWD=/usr/src
main: PATH=/bin:/usr/bin:/sbin:/usr/sbin
main: PWD=/usr/src/udev-145
main: LANG=en_US.ISO-8859-1
main: PS1=\u:\w\$
main: SHLVL=1
main: HOME=/root

>    -- Bruce
> -- 


> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page

More information about the lfs-support mailing list