Re: Disable net_applet if found NM-controlled interface

Александр Казанцев <[email protected]>
Newsgroups gmane.linux.mandrake.cooker.devel
Message-ID <CAAqM-Ac8euF5UEDPaRz35EGtq_ndxFWC2uP_i76TFd7hKkkZ7A@mail.gmail.com>
May be. For my opinion are correct is fully break link with NM and
nm_applet, remove netcenter from drakconf and using NM-only, fixing
error with it. But we need rewision interactive firewall (it's on
net_applet),rewrite draknetprofile and other change.

2012/1/16 Nicolas Lécureuil <[email protected]>:
> 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
>



-- 
С уважением руководитель образовательных программ Mandriva.Ru
(www.edumandriva.ru), старший научный сотрудник ЗАО "Тырнет"
(www.tyrnet.ru), к.т.н., Казанцев Александр Сергеевич
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.