Mailinglist Archive: opensuse-factory (551 mails)

< Previous Next >
Re: [opensuse-factory] networkmanager and dispatcher.d
On Tue, 2011-05-10 at 14:32 +0200, Dimstar / Dominique Leuenberger
wrote:
I see that NM changed apparently a bunch around there and much more
information is passed in ENV. Not exactly sure if everything, but it
might be worthy to check what all ENV contains while one of those
dispatchers run.

(much more information can be passed reliably than on command line)

I wasn't just able to find some documentation for the dispatcher
scripts... they are a little bit hidden magic :)

I just verified this on my system (with NM 0.8.998 as well on Factory).

$1 still refers to the device (eth0) and $2 to the mode (up/down).
No changes there.

I used this dummy dispatcher script:
###
#!/bin/sh

while [ ! -z "$1" ]; do
echo "Next param: $1" >> /tmp/z01_test
shift
done

echo "*** env ***" >> /tmp/z01_test
env >> /tmp/z01_test
###

And the log file spits nicely out what it should:
cat z01_test
Next param: eth0 [ refers to $1 ]
Next param: up [ refers to $2 ]
*** env ***
IP4_NAMESERVERS=<my name severs>
CONNECTION_UUID=f8bf5f9a-ad90-4189-840c-67bc1948dded
DHCP4_NETWORK_NUMBER=<netnum>
IP4_NUM_ADDRESSES=1
DHCP4_DHCP_SERVER_IDENTIFIER=<dhcpserver>
IP4_ADDRESS_0=<ipaddr/cidr> <defgw>
DHCP4_DHCP_MESSAGE_TYPE=5
DHCP4_BROADCAST_ADDRESS=<bcast address>
DHCP4_EXPIRY=1305290562
DHCP4_IP_ADDRESS=<ip address>
DHCP4_ROUTERS=<routers>
CONNECTION_ID=Auto eth0
PWD=/
IP4_NUM_ROUTES=0
SHLVL=1
DHCP4_DHCP_LEASE_TIME=259200
DHCP4_SUBNET_MASK=255.255.255.0
DHCP4_NDS_TREE_NAME=<tree name>
DHCP4_DOMAIN_NAME_SERVERS=<dns server list>
_=/usr/bin/env

so NM generally seems to be fine here.

Dominique

--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups