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
install: install-docs
# Configuration files
install -d $(DESTDIR)/etc/network.d/{examples,hooks,interfaces}
install -m644 docs/examples/* $(DESTDIR)/etc/network.d/examples/
install -d $(DESTDIR)/etc/netctl/{examples,hooks,interfaces}
install -m644 docs/examples/* $(DESTDIR)/etc/netctl/examples/
# Libs
install -d $(DESTDIR)/usr/lib/network/connections
install -m644 src/lib/{8021x,globals,ip,rfkill} $(DESTDIR)/usr/lib/network/
......
......@@ -13,7 +13,7 @@ _wireless_interfaces()
_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() {
(( $+function[_netctl_command] )) ||
_netctl_command() {
[[ $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
DESCRIPTION
-----------
Profiles for netctl live under '/etc/network.d/' and are plain text
files. The files consist of variable definitions following the bash
shell syntax and are not expected to execute any code. It is good to
omit as much quoting as possible. For a few WPA-related variables,
special quoting rules (see below) apply.
Profiles for netctl live under '/etc/netctl/' and are plain text files.
The files consist of variable definitions following the bash shell
syntax and are not expected to execute any code. It is good to omit as
much quoting as possible. For a few WPA-related variables, special
quoting rules (see below) apply.
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
profile is read, all executable scripts in '/etc/network.d/hooks/' and
any executable script in '/etc/network.d/interfaces/' with the name of
the interface for the profile are sourced. For each connection type,
there are example profile files in '/etc/network.d/examples/'.
profile is read, all executable scripts in '/etc/netctl/hooks/' and any
executable script in '/etc/netctl/interfaces/' with the name of the
interface for the profile are sourced. For each connection type, there
are example profile files in '/etc/netctl/examples/'.
AVAILABLE CONNECTION TYPES
......
......@@ -26,8 +26,8 @@ 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:
--------------------------------------------------------------------
echo "[[ -t 0 ]] || sleep 3" > /etc/network.d/interfaces/<interface>
chmod 755 /etc/network.d/interfaces/<interface>
echo "[[ -t 0 ]] || sleep 3" > /etc/netctl/interfaces/<interface>
chmod 755 /etc/netctl/interfaces/<interface>
--------------------------------------------------------------------
A more concise solution is to first enable a profile through netctl
and then disable it again through systemctl:
......
......@@ -22,7 +22,7 @@ available. The readily sourced files are:
/usr/lib/network/network
/usr/lib/network/globals
/etc/network.d/<profile>
/etc/netctl/<profile>
Here, <profile> is the profile file specifying the desired network
configuration.
PROFILE_DIR="/etc/network.d"
PROFILE_DIR="/etc/netctl"
SUBR_DIR="/usr/lib/network"
CONN_DIR="$SUBR_DIR/connections"
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