summaryrefslogtreecommitdiffstats
path: root/bin/draknetcenter
diff options
context:
space:
mode:
Diffstat (limited to 'bin/draknetcenter')
-rwxr-xr-xbin/draknetcenter28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/draknetcenter b/bin/draknetcenter
new file mode 100755
index 0000000..7396631
--- /dev/null
+++ b/bin/draknetcenter
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+# Olivier Blin, 2007 <oblin@mandriva.com>
+# Licensed under the GPL
+
+use strict;
+use lib qw(/usr/lib/libDrakX);
+
+# i18n: IMPORTANT: to get correct namespace (drakx-net instead of libDrakX)
+BEGIN { unshift @::textdomains, 'drakx-net' }
+
+use common;
+use standalone;
+use network::network;
+use network::monitor;
+use network::netcenter;
+use dbus_object;
+
+#- Allow multiple instances, but only one per user:
+is_running('draknetcenter') and die "draknetcenter already running\n";
+
+my $in = 'interactive'->vnew('su');
+my $net = {};
+network::network::read_net_conf($net);
+my $dbus;
+eval { $dbus = dbus_object::system_bus() };
+eval { $net->{monitor} = network::monitor->new($dbus) } if $dbus;
+
+network::netcenter::main($in, $net, $dbus);