Joey Boggs
2009-Feb-23 22:09 UTC
[Ovirt-devel] [PATCH server] networkmanager enabled check
Network Manager seems to have some quirkiness in accepting the dhclient options, for now we will check to see if it's enabled and force to use the regular network service in it's place for now. --- installer/bin/ovirt-installer | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/installer/bin/ovirt-installer b/installer/bin/ovirt-installer index 3ba9813..86c9b9b 100755 --- a/installer/bin/ovirt-installer +++ b/installer/bin/ovirt-installer @@ -103,6 +103,15 @@ if File.exist?("/usr/sbin/selinuxenabled") end end +if File.exist?("/etc/init.d/NetworkManager") + nm = `/sbin/service NetworkManager status` + if nm !~ /stopped/ + @cli.say("NetworkManager is running, disable and use standard network scripts before proceeding") + exit + else + end +end + # Networking Configuration dev_ct = 0 net_devs = `hal-find-by-capability --capability net` -- 1.6.0.6
Jeremy Katz
2009-Feb-24 03:20 UTC
[Ovirt-devel] [PATCH server] networkmanager enabled check
On Monday, February 23 2009, Joey Boggs said:> Network Manager seems to have some quirkiness in accepting the dhclient options, for now we will check to see > if it's enabled and force to use the regular network service in it's place for now.It was working okay for me last week -- what problem are you seeing?> diff --git a/installer/bin/ovirt-installer b/installer/bin/ovirt-installer > index 3ba9813..86c9b9b 100755 > --- a/installer/bin/ovirt-installer > +++ b/installer/bin/ovirt-installer > @@ -103,6 +103,15 @@ if File.exist?("/usr/sbin/selinuxenabled") > end > end > > +if File.exist?("/etc/init.d/NetworkManager") > + nm = `/sbin/service NetworkManager status` > + if nm !~ /stopped/Much better to actually check the return code of the command rather than regex of the output -- if you're running in a non-English locale, then you'll get a different answer here. Jeremy