FS#25432 - [netcfg] Error setting gateway

Attached to Project: Arch Linux
Opened by Nikos Platis (nplatis) - Sunday, 07 August 2011, 10:30 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Monday, 08 August 2011, 22:22 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Rémy Oudompheng (remyoudompheng)
Architecture i686
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I had a profile for setting a static IP for eth0, which worked fine (settings copied from the examples/ethernet-static file).

After a recent update, this profile cannot be applied. I get the following message:

Error: an inet prefix is expected rather than "gateway".
> Adding route 'gateway' failed


Additional info:

netcfg v2.6.6


My profile file:

CONNECTION='ethernet'
DESCRIPTION='Static IP for home'
INTERFACE='eth0'
HOSTNAME='zzz'
IP='static'
ADDR='192.168.1.6'
GATEWAY='192.168.1.1'
DNS=('192.168.1.1')
This task depends upon

Closed by  Rémy Oudompheng (remyoudompheng)
Monday, 08 August 2011, 22:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  In 2.6.7, ROUTES is unset before loading profile.
Comment by Rémy Oudompheng (remyoudompheng) - Sunday, 07 August 2011, 10:43 GMT
Hello, can you re-run netcfg after exporting NETCFG_DEBUG=1 and paste the output? Thanks.
Comment by Nikos Platis (nplatis) - Sunday, 07 August 2011, 11:38 GMT
Hello.

Unfortunately I cannot reproduce the problem, now the profile works correctly.

The only thing that I did in the meanwhile was to use the standard 'network' daemon to setup my static IP in rc.conf. Here is the full story:

- My rc.conf contained the old-style syntax for setting-up network interfaces for use with 'network' (since I hadn't used 'network' for a long time)
- Since netcfg was not working, I tried to use the 'network' daemon to set up my static IP. Upon running it, I received a message about my configuration being deprecated (but 'network' set up my static IP fine).
- Then I went to rc.conf and converted the settings to the new syntax. Now 'network' is running without complains.
- After your message I tried to run netcfg again and found out it runs OK now.

Anyway, here is the output of netcfg: (1_Home is the static IP profile, 0_DHCP is a DHCP profile)

-----------
DEBUG: Loading profile 1_Home
DEBUG: Configuring interface eth0
:: 1_Home up [BUSY] DEBUG: status reported to profile_up as: 0_DHCP
DEBUG: Loading profile 0_DHCP
DEBUG: Configuring interface eth0
DEBUG: status reported to profile_down as: 0_DHCP
:: 0_DHCP down [BUSY] DEBUG: Loading profile 0_DHCP
DEBUG: Configuring interface eth0
DEBUG: ethernet_down dhclient -q -r eth0
DEBUG: ethernet_down /bin/kill 2216
DEBUG: ethernet_down if_down
[DONE]
DEBUG: Loading profile 1_Home
DEBUG: Configuring interface eth0
DEBUG: ethernet_iproute_up ifup
DEBUG: ethernet_iproute_up ip addr add 192.168.1.6/24 brd + dev eth0
DEBUG: ethernet_iproute_up ip route add default via 192.168.1.1 dev eth0
DEBUG: ethernet_iproute_up hostname zouzounaki
[DONE]
-----------
Comment by Jun Xie (pright) - Monday, 08 August 2011, 02:25 GMT
I encountered the same problem exactly. But after I modified my rc.conf with the new syntax, it works well.
Comment by sylar_5 (sylar_5) - Monday, 08 August 2011, 07:50 GMT
as Jun Xie said, the problem seems to be the old rc.conf .
I had the same, and updating it helped.
(I think the problem was the
ROUTES=(!gateway)
line)

Loading...