Commit 7f1eee3a authored by Jouke Witteveen's avatar Jouke Witteveen
Browse files

Move the location for profiles

Old location: /etc/network.d
New location: /etc/netctl

This should ease migration from netcfg and is a better path anyway.
parent 763f34bf
...@@ -4,8 +4,8 @@ export VERSION = 0.4 ...@@ -4,8 +4,8 @@ export VERSION = 0.4
install: install-docs install: install-docs
# Configuration files # Configuration files
install -d $(DESTDIR)/etc/network.d/{examples,hooks,interfaces} install -d $(DESTDIR)/etc/netctl/{examples,hooks,interfaces}
install -m644 docs/examples/* $(DESTDIR)/etc/network.d/examples/ install -m644 docs/examples/* $(DESTDIR)/etc/netctl/examples/
# Libs # Libs
install -d $(DESTDIR)/usr/lib/network/connections install -d $(DESTDIR)/usr/lib/network/connections
install -m644 src/lib/{8021x,globals,ip,rfkill} $(DESTDIR)/usr/lib/network/ install -m644 src/lib/{8021x,globals,ip,rfkill} $(DESTDIR)/usr/lib/network/
......
...@@ -13,7 +13,7 @@ _wireless_interfaces() ...@@ -13,7 +13,7 @@ _wireless_interfaces()
_netctl_profiles() _netctl_profiles()
{ {
find -L /etc/network.d -maxdepth 1 -type f -not -name '.*' -not -name '*~' -not -name '*.conf' -not -name '*.service' -printf "%f\n" find -L /etc/netctl -maxdepth 1 -type f -not -name '.*' -not -name '*~' -not -name '*.conf' -not -name '*.service' -printf "%f\n"
} }
......
...@@ -12,7 +12,7 @@ _wireless_interfaces() { ...@@ -12,7 +12,7 @@ _wireless_interfaces() {
(( $+function[_netctl_command] )) || (( $+function[_netctl_command] )) ||
_netctl_command() { _netctl_command() {
[[ $words[1] = (start|stop|restart|switch-to|status|enable|disable|reenable) ]] && [[ $words[1] = (start|stop|restart|switch-to|status|enable|disable|reenable) ]] &&
compadd "${(f)$(find -L /etc/network.d -maxdepth 1 -type f -not -name '.*' -not -name '*~' -not -name '*.conf' -not -name '*.service' -printf "%f\n")}" compadd "${(f)$(find -L /etc/netctl -maxdepth 1 -type f -not -name '.*' -not -name '*~' -not -name '*.conf' -not -name '*.service' -printf "%f\n")}"
} }
......
...@@ -13,18 +13,18 @@ netctl.profile ...@@ -13,18 +13,18 @@ netctl.profile
DESCRIPTION DESCRIPTION
----------- -----------
Profiles for netctl live under '/etc/network.d/' and are plain text Profiles for netctl live under '/etc/netctl/' and are plain text files.
files. The files consist of variable definitions following the bash The files consist of variable definitions following the bash shell
shell syntax and are not expected to execute any code. It is good to syntax and are not expected to execute any code. It is good to omit as
omit as much quoting as possible. For a few WPA-related variables, much quoting as possible. For a few WPA-related variables, special
special quoting rules (see below) apply. quoting rules (see below) apply.
The name of the profile is the name of the file. Profile names must not The name of the profile is the name of the file. Profile names must not
contain newlines and should not end in '.service' or '.conf'. Whenever a contain newlines and should not end in '.service' or '.conf'. Whenever a
profile is read, all executable scripts in '/etc/network.d/hooks/' and profile is read, all executable scripts in '/etc/netctl/hooks/' and any
any executable script in '/etc/network.d/interfaces/' with the name of executable script in '/etc/netctl/interfaces/' with the name of the
the interface for the profile are sourced. For each connection type, interface for the profile are sourced. For each connection type, there
there are example profile files in '/etc/network.d/examples/'. are example profile files in '/etc/netctl/examples/'.
AVAILABLE CONNECTION TYPES AVAILABLE CONNECTION TYPES
......
...@@ -26,8 +26,8 @@ netctl.service:: ...@@ -26,8 +26,8 @@ netctl.service::
a profile binds to might not be available yet, when netctl.service a profile binds to might not be available yet, when netctl.service
tries to bring a profile up. A simple, hackish, solution is to do: tries to bring a profile up. A simple, hackish, solution is to do:
-------------------------------------------------------------------- --------------------------------------------------------------------
echo "[[ -t 0 ]] || sleep 3" > /etc/network.d/interfaces/<interface> echo "[[ -t 0 ]] || sleep 3" > /etc/netctl/interfaces/<interface>
chmod 755 /etc/network.d/interfaces/<interface> chmod 755 /etc/netctl/interfaces/<interface>
-------------------------------------------------------------------- --------------------------------------------------------------------
A more concise solution is to first enable a profile through netctl A more concise solution is to first enable a profile through netctl
and then disable it again through systemctl: and then disable it again through systemctl:
......
...@@ -22,7 +22,7 @@ available. The readily sourced files are: ...@@ -22,7 +22,7 @@ available. The readily sourced files are:
/usr/lib/network/network /usr/lib/network/network
/usr/lib/network/globals /usr/lib/network/globals
/etc/network.d/<profile> /etc/netctl/<profile>
Here, <profile> is the profile file specifying the desired network Here, <profile> is the profile file specifying the desired network
configuration. configuration.
PROFILE_DIR="/etc/network.d" PROFILE_DIR="/etc/netctl"
SUBR_DIR="/usr/lib/network" SUBR_DIR="/usr/lib/network"
CONN_DIR="$SUBR_DIR/connections" CONN_DIR="$SUBR_DIR/connections"
STATE_DIR="/run/network" STATE_DIR="/run/network"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment