Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144644 - Webmin: Network module trashes /etc/conf.d/net
Summary: Webmin: Network module trashes /etc/conf.d/net
Status: RESOLVED REMIND
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Lowest minor (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: http://packages.gentoo.org/search/?ss...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-21 07:50 UTC by Allen Gwinn
Modified: 2007-09-30 19:27 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allen Gwinn 2006-08-21 07:50:39 UTC
Webmin's net module writes /etc/conf.d/net in a deprecated format.  Initially, it was the config_ethx="...." with the alias_ethx="..."  However, that format has now been fully deprecated--and webmin just trashes the config.

This means other really useful things like Virtualmin don't work--and end up trashing your server.  So this should proably be masked out until someone fixes it.  Who knows... maybe I'll see if I can get around to it this week.

Seems there was another bad problem with Virtualmin dealing with how it processed virtual interfaces versus IP addresses under Gentoo.

Anyway, "out of the box" it turns this:

----
config_eth0=( "192.168.1.132 netmask 255.255.255.128 brd 192.168.1.255" )
routes_eth0=( "default gw 192.168.1.254" )
----

into this:

----
config_eth0="( "192.168.1.132 netmask 255.255.255.128 brd 192.168.1.255" )"
routes_eth0="( "default gw 192.168.1.254" )"
alias_eth0="192.168.1.130"
netmask_eth0="255.255.255.128"
broadcast_eth0="192.168.1.255"
----

...which, of course, makes the OS do everything but boot right!
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-08-21 09:08:29 UTC
If you have config_eth0 then only new style config is used
If you don't then it tries to support old style.

The error is in mixing them.
Comment 2 Allen Gwinn 2006-08-21 09:48:33 UTC
(In reply to comment #1)
> If you have config_eth0 then only new style config is used
> If you don't then it tries to support old style.
> 
> The error is in mixing them.
> 

Actually, it doesn't.  I had one that was the "old style" and, after the latest round of emerge --update --deep world, the "old style" is no longer supported.  So probably the best thing is to change Webmin to conform. 

I'm looking at it right now.
Comment 3 Allen Gwinn 2006-08-21 10:31:36 UTC
Question: would it be safe to *not* read /etc/conf.d/net and just build it based on currently active interfaces and routing?  It would tend to (1) reduce the chance of parsing error and (2) allow a more "pristine" /etc/conf.d/net file to be built out of webmin.

Also, /etc/conf.d/routes needs to be factored in as well.
Comment 4 Allen Gwinn 2006-08-21 10:36:25 UTC
...more

The only time it seems like this would be a problem is if someone wanted to add an interface that they didn't want active at boot (a temporary alias), and then decided for whatever reason, they wanted to add a permanent alias interface.

"But nobody's ever really going to want to do that, are they?" :)

Love making assumptions and writing code to carry it out :)
Comment 5 Roy Marples (RETIRED) gentoo-dev 2006-08-22 12:17:48 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > If you have config_eth0 then only new style config is used
> > If you don't then it tries to support old style.
> > 
> > The error is in mixing them.
> > 
> 
> Actually, it doesn't.  I had one that was the "old style" 

Then open a new bug attaching your full /etc/conf.d/net file as that's news to me.
Comment 6 Allen Gwinn 2006-08-23 08:04:25 UTC
I've got a better way... delete everything out of /etc/conf.d/net then use the Webmin interface to add eth0 back with a static IP address.  Then add an alias (eth0:1).  Then reboot and watch the console messages.
Comment 7 Elfyn McBratney (beu) (RETIRED) gentoo-dev 2006-12-06 06:53:53 UTC
*Yoink*
Comment 8 Allen Gwinn 2007-05-26 17:34:04 UTC
Accidentally resolved.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-09-30 19:27:37 UTC
Zzzzzzzz.