On 03/30/2016 09:14 AM, Andrew C Aitchison wrote:
On Wed, 30 Mar 2016, Benjamin Lefoul wrote:
Hi,
I have set monitor-connection-files=true in my
/etc/NetworkManager/NetworkManager.conf
It works fine (in fact, instantly) if I edit
/etc/sysconfig/network-scripts/ifcfg-eth0 with emacs or vi (for
instance, changing the IP).
It fails miserably if I use sudoedit, or sed:
I *think* emacs writes a new file with a different name and then
renames it.
Try "ls -li /etc/sysconfig/network-scripts/ifcfg-eth0" before and
after editting; if the inode/inum (the number at the beginning) has
changed
that is what your editor is doing, and what NetworkManager is looking
for.
# grep 100 /etc/sysconfig/network-scripts/ifcfg-eth0
IPADDR=192.168.4.100
# sed -i 's/100/155/g' /etc/sysconfig/network-scripts/ifcfg-eth0
Even though all stats (access modify and change) are renewed.
It's worse than that: even nmcli con reload afterwards fails.
In fact, the only way to get the ip to change is by entering the file
with vi, not touching it, and leave with ":wq" (not just ":q").
Why is that? What is going on here?
I know, I know, I can use nmcli in scripts, and not
string-manipulation tools, but say I don't want to... :)
And still, during operations, I'd rather edit the files with sudoedit...
Thanks in advance,
Benjamin Lefoul
nWISE AB
I have a related question. I have now inserted an appropriate UTP cable
into the RJ-45 jack on my laptop, I have a green LED (meaning MAC
signal) -- thus I have a 802.3 connection. However, unlike previous
incarnations of Network Manager, the present SL7 one does not allow me
to activate the 802.3 connection, but only the 802.11 connection.
Evidently, despite claims that NAT should work with 802.11 to VirtualBox
running a MS Win 7 Pro guest (a claim as I recall contradicted by other
respondents), it does not (MS Win sees no network). Thus, I am
attempting to run my laptop on a wired 802.3 connection, but I cannot
seem to activate it. I do need Network Manager when I am in the field
and must connect to arbitrary 802.11 WLANs in a fashion similar to MS
Win and Mac OS X (for which the "automagic" 802.11 DHCP hotel, etc.,
networks seem to be designed). How do I get Network Manager to allow me
to activate the wired connection? Note that Network Manager does "see"
the 802.3 NIC ( it displays Ethernet Network (Intel Ethernet Connection
I217-LM) but shows disconnected and will not let me connect. Do I need
to be root to make this happen?
If this related query should be a new thread, I will repost as such if
that is appropriate.
Any help would be appreciated.
Yasha Karant