According to the scheme the library gets information from netctl and can control it. Also it provides some additional functions such as a profile creation and removal and access to wpa_supplicant functions. Some functions do not require additional permissions, but other ones do it. All dynamic arguments including profile names and paths are in double quotes to avoid white spaces problem. The functions which require root privileges are:
Netctl control module
-
+
netctl stop-all|start|stop|restart|switch-to|enable|disable|reenable <profile>. They are commands which provide a general control to netctl.
systemctl start|restart|enable <netctl-auto@service>. They are commands which provide ability to control netctl-auto systemd service.
-
+
Netctl profiles module
-
+
Copying of a temporary profile from home directory to netctl profiles directory. cp command is used for it.
Removal of a profile. rm command is used for it.
-
+
WiFi module
-
+
This module require root privileges to start wpa_supplicant only. For the futher interaction user must be in CTRL_GROUP.
-
+
If library will be initialized with FORCE_SUDO=true than it will use sudo command (which can be transferred to the library by SUDO_PATH option). Otherwise it will try to set UID of children processes to 0. Please note that sudo command and UID setting will be used only for those commands which require it.
@@ -96,10 +103,10 @@ env -i bash -c "source '<profile>'; for i in ${!<key>[@]}; do ec