summaryrefslogtreecommitdiff
path: root/extra/networkmanager
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-03-30 17:54:09 +0100
committerdavidovski <david@davidovski.xyz>2022-03-30 17:54:09 +0100
commitde16da348671bd797500ab144ae56d23e88c7463 (patch)
tree728ec7d354049c977b34d9693109cd5683992a30 /extra/networkmanager
parent9ae31d6c582fbb636625a87d0921fd914f33c05e (diff)
fixed initd files
Diffstat (limited to 'extra/networkmanager')
-rw-r--r--extra/networkmanager/networkmanager-dispatcher.initd12
-rw-r--r--extra/networkmanager/networkmanager.conf2
-rw-r--r--extra/networkmanager/networkmanager.initd17
-rw-r--r--extra/networkmanager/networkmanager.rules9
4 files changed, 40 insertions, 0 deletions
diff --git a/extra/networkmanager/networkmanager-dispatcher.initd b/extra/networkmanager/networkmanager-dispatcher.initd
new file mode 100644
index 0000000..552cc15
--- /dev/null
+++ b/extra/networkmanager/networkmanager-dispatcher.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+
+supervisor=supervise-daemon
+command=/usr/libexec/nm-dispatcher
+command_args_foreground="--persist"
+
+description="Network Manager Dispatcher Daemon"
+
+depend() {
+ need dbus
+ before networkmanager
+}
diff --git a/extra/networkmanager/networkmanager.conf b/extra/networkmanager/networkmanager.conf
new file mode 100644
index 0000000..526d2e4
--- /dev/null
+++ b/extra/networkmanager/networkmanager.conf
@@ -0,0 +1,2 @@
+[main]
+dhcp=internal
diff --git a/extra/networkmanager/networkmanager.initd b/extra/networkmanager/networkmanager.initd
new file mode 100644
index 0000000..4ca6a0d
--- /dev/null
+++ b/extra/networkmanager/networkmanager.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the terms of the GNU General Purpose License v2
+# $Header: $
+
+supervisor=supervise-daemon
+command=/usr/sbin/NetworkManager
+command_args_foreground="-n"
+
+description="Network Manager Daemon"
+
+depend() {
+ need dbus
+ provide net
+}
+
+# vim: set ft=gentoo-init-d ts=3 sw=3 et:
diff --git a/extra/networkmanager/networkmanager.rules b/extra/networkmanager/networkmanager.rules
new file mode 100644
index 0000000..66d21d6
--- /dev/null
+++ b/extra/networkmanager/networkmanager.rules
@@ -0,0 +1,9 @@
+// Let users in plugdev group modify NetworkManager
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
+ subject.isInGroup("plugdev") && subject.active) {
+ return "yes";
+ }
+});
+
+