Re: Disable net_applet if found NM-controlled interface
Nicolas Lécureuil <[email protected]>
| Newsgroups | gmane.linux.mandrake.cooker.devel |
|---|---|
| Message-ID | <CAD2-FYW0rVZfuD9QfTfW7pH+9UkDqOwG3ikr8J8UGC3+7Xutxw@mail.gmail.com> |
On Sun, Jan 15, 2012 at 8:32 PM, Alexander Kazancev <[email protected]> wrote: > Since last drak-net update to 0.96 version net_applet now autostart, > even all interface NM-enabled. It's not correct. > > May be we will use this small patch: > > --- drakx-net-0.96/bin/net_applet 2012-01-15 01:25:37.000000000 +0400 > +++ drakx-net-0.96/bin/net_applet.new 2012-01-15 23:22:09.000000000 +0400 > @@ -28,6 +28,21 @@ > my $system_file = '/etc/sysconfig/drakx-net'; > shouldStart() or die "$onstartupfile should be set to TRUE or use > net_applet --force\n"; > > +#Check for NM > + foreach (all("$::prefix/etc/sysconfig/network-scripts")) { > + my ($device) = /^ifcfg-([A-Za-z0-9.:_-]+)$/; > + next if $device =~ /.rpmnew$|.rpmsave$/; > + if ($device && $device ne 'lo') { > + my $file = network::network::get_ifcfg_file($device); > + my $NM_control = { getVarsFromSh($file) }->{NM_CONTROLLED}; > + if ( $NM_control eq 'yes') > + { > + print "Found NM-controlled interface"; > + exit; > + } > + } > + } > + > #- Allow multiple instances, but only one per user: > is_running('net_applet') and die "net_applet already running\n"; > > It's check interface cfg file and if find NM_ENABLED exit nm_applet. > If this usefull, i add patch to cooker > > -- > Chief of educational programs Mandriva Russia (http://edumandriva.ru) > Alexander Kazancev can't we just remove the applet itself ? ( as i have been told that other stuffs of net_applet rpm are needed by some mdv ppl ) But here i ask only for the systray applet -- Regards Nicolas Lécureuil Mandriva KDE Lead Dev Mandriva KDE Manager France