From de16da348671bd797500ab144ae56d23e88c7463 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 30 Mar 2022 17:54:09 +0100 Subject: fixed initd files --- extra/networkmanager/networkmanager-dispatcher.initd | 12 ++++++++++++ extra/networkmanager/networkmanager.conf | 2 ++ extra/networkmanager/networkmanager.initd | 17 +++++++++++++++++ extra/networkmanager/networkmanager.rules | 9 +++++++++ 4 files changed, 40 insertions(+) create mode 100644 extra/networkmanager/networkmanager-dispatcher.initd create mode 100644 extra/networkmanager/networkmanager.conf create mode 100644 extra/networkmanager/networkmanager.initd create mode 100644 extra/networkmanager/networkmanager.rules (limited to 'extra/networkmanager') 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 +# 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"; + } +}); + + -- cgit v1.2.1