summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-06-19 22:42:02 +0200
committerRémy Oudompheng <remy@archlinux.org>2011-06-19 22:55:26 +0200
commit165fececf5e74d613d6ea54f927e9ed81dcb3673 (patch)
tree303e97fbf89021ab6239020b9890b53c01f84a4d
parent722552487d3f8e6525cbb873354e3c282d05bbcf (diff)
downloadnetctl-165fececf5e74d613d6ea54f927e9ed81dcb3673.tar.gz
netctl-165fececf5e74d613d6ea54f927e9ed81dcb3673.tar.xz
Add the possibility of restricting autostart to certain profiles (FS#23169)
This is done via the AUTO_PROFILES setting in /etc/conf.d/netcfg. Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
-rw-r--r--NEWS2
-rw-r--r--wpa_actiond/net-auto-wireless.service1
-rwxr-xr-xwpa_actiond/netcfg-wpa_actiond4
3 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 313ef93..4cace18 100644
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,7 @@ version 2.6
- add support for static routes configuration (FS#18700)
- add support for creating tun/tap interfaces (FS#15049)
- add configuration file /etc/conf.d/netcfg for net-auto-wireless
-- add support for restricting automatic profiles (FS#23169)
+- add support for restricting automatic startup of profiles (FS#23169)
- bridge: add support for several brctl options (FS#16625)
- wireless: add support for explicit BSSID (FS#24582)
- wireless: add support for ad-hoc connections (FS#19683)
diff --git a/wpa_actiond/net-auto-wireless.service b/wpa_actiond/net-auto-wireless.service
index 68b0b93..7075cb5 100644
--- a/wpa_actiond/net-auto-wireless.service
+++ b/wpa_actiond/net-auto-wireless.service
@@ -4,6 +4,7 @@ After=dbus.service
[Service]
EnvironmentFile=/etc/rc.conf
+EnvironmentFile=/etc/conf.d/netcfg
ExecStart=/usr/bin/netcfg-wpa_actiond $WIRELESS_INTERFACE
ExecStop=/usr/bin/netcfg-wpa_actiond stop $WIRELESS_INTERFACE
RemainAfterExit=yes
diff --git a/wpa_actiond/netcfg-wpa_actiond b/wpa_actiond/netcfg-wpa_actiond
index 045e7be..3bbb9fc 100755
--- a/wpa_actiond/netcfg-wpa_actiond
+++ b/wpa_actiond/netcfg-wpa_actiond
@@ -2,6 +2,8 @@
. /usr/lib/network/network
. $SUBR_DIR/8021x
. $SUBR_DIR/rfkill
+. /etc/rc.conf
+. /etc/conf.d/netcfg
AUTOWIFI="/usr/sbin/wpa_actiond -p /run/wpa_supplicant"
ACTION_SCRIPT="/usr/bin/netcfg-wpa_actiond-action"
@@ -49,7 +51,7 @@ fi
WPA_CONF="$(make_wpa_config_file $interface)"
-for profile in $(list_profiles); do
+for profile in ${AUTO_PROFILES:-$(list_profiles)}; do
echo $profile
(
load_profile $profile