Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483468 - net-misc/networkmanager - nm does not set IP4_NUM_ADDRESSES in environment
Summary: net-misc/networkmanager - nm does not set IP4_NUM_ADDRESSES in environment
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-03 09:31 UTC by Ryan Li
Modified: 2013-12-09 08:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info networkmanager (emerge-info.log,5.35 KB, text/x-log)
2013-09-03 09:32 UTC, Ryan Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Li 2013-09-03 09:31:43 UTC
Hi,

I am writing a dispatch script for NetworkManager that sets a specific route when a network is up.

I looked at NetworkManager's man page and it says:

> The environment contains more information about the interface...
> IP4_NUM_ADDRESSES contains the number addresses the script may expect.

However, I put some debug lines in my dispatch script and here's the output:
> DEVICE_IP_IFACE=eth0
> CONNECTION_UUID=cd76e84d-****-****-****-7956e10a8291
> DEVICE_IFACE=eth0
> IP6_NUM_ADDRESSES=2
> CONNECTION_ID=Wired connection 1
> PWD=/
> IP4_NUM_ROUTES=0
> SHLVL=1
> IP6_ADDRESS_1=f47b:f301::****:****:0:0/64 87c:f301::****:****:0:0
> IP6_ADDRESS_0=c47b:f301::****:****:0:0/64 d87b:f301::****:****:0:0

IP4_NUM_ADDRESSES isn't set as an environment variable, and a couple seconds after the dispatch script is run, I could see interface eth0 assigned an IPv4 address. So I assume that the dispatch script is being run prematurely.

Reproducible: Always
Comment 1 Ryan Li 2013-09-03 09:32:11 UTC
Created attachment 357750 [details]
emerge --info networkmanager
Comment 2 Gilles Dartiguelongue gentoo-dev 2013-09-04 19:07:28 UTC
does it work if you change the settings in NM to say "require ipv4 connectivity for this interface to work".

It's in nm-connection-editor, not the gnome-control-center network panel.
Comment 3 Ryan Li 2013-09-05 04:55:58 UTC
No it doesn't work. I get the same output.
Comment 4 Pacho Ramos gentoo-dev 2013-09-29 10:42:30 UTC
What networkmanager version? Are you using ifnet or keyfile plugin?
Comment 5 Ryan Li 2013-09-30 02:46:33 UTC
(In reply to Pacho Ramos from comment #4)
> What networkmanager version? Are you using ifnet or keyfile plugin?

$ equery list networkmanager
 * Searching for networkmanager ...
[IP-] [  ] net-misc/networkmanager-0.9.6.4:0

I am not using any plugins.
Comment 6 Pacho Ramos gentoo-dev 2013-09-30 06:45:32 UTC
Try with 0.9.8.4, you are probably using ifnet if you haven't touched anything
Comment 7 Pacho Ramos gentoo-dev 2013-12-09 08:55:48 UTC
(In reply to Pacho Ramos from comment #6)
> Try with 0.9.8.4, you are probably using ifnet if you haven't touched
> anything

Also try with 0.9.8.8 and post "emerge -Opv networkmanager" output