Fedora Linux Support Community & Resources Center
  #1  
Old 21st May 2012, 08:28 AM
alton Offline
Registered User
 
Join Date: Nov 2006
Posts: 14
windows_xp_2003firefox
Network Manager dispatcher.d and ifconfig

Hi,

I have a script under the /etc/NetworkManager/dispatcher.d that will extract the assigned IP of an interface. The interface is using DHCP.

To get the IP address I use ifconfig and do some string manipulation. The script would look something like this:

ifconfig $INFACE | grep "inet addr" | cut -d":" -f2

The script works fine when I execute it outside network manager and when the interface is up.

The problem is if I execute it inside the Network Manager it is not getting the IP address. It seems at the time when this script is executed there is no address yet so the string "inet addr" could not be found. I suspect that the reason is that dhclient has not done its job yet. So my questions now are:

Does network manager waits for one script to finish before executing the next one? If not then should I put my script inside the 11-dhclient script? Is there something like a 'post-up' in the Network manager similar to ifup?
Reply With Quote
  #2  
Old 22nd May 2012, 02:47 AM
alton Offline
Registered User
 
Join Date: Nov 2006
Posts: 14
windows_xp_2003firefox
Re: Network Manager dispatcher.d and ifconfig

Ok, I know what is wrong.

The problem is that when Network Manager executes the script there seems to be no environment settings (much like cron perhaps). So the $PATH is not set therefore it cannot find the programs like 'ifconfig'.
Reply With Quote
Reply

Tags
dispatcherd, ifconfig, manager, network

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel Ethernet NIC Visible in lspci but not it ifconfig or Network Manager timlev Hardware & Laptops 0 21st January 2012 01:30 PM
network manager dispatcher script not loading at all captainralf Servers & Networking 0 30th July 2011 01:14 PM
ifconfig and iwconfig see wlan0, but Network manager does not psytropic Servers & Networking 2 22nd August 2010 06:38 PM
Very strange wlan problems - ifconfig confused, network manager even more so Techbart Servers & Networking 0 22nd December 2009 04:53 PM


Current GMT-time: 19:36 (Thursday, 24-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat