summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--doc/ethernet46
-rw-r--r--doc/wireless38
-rw-r--r--docs/ethernet (renamed from doc/ethernet-subr)11
-rw-r--r--docs/features80
-rwxr-xr-xdocs/make.sh7
-rw-r--r--docs/wireless43
-rw-r--r--docs/wireless-dbus (renamed from doc/wireless-dbus)4
-rw-r--r--src/netcfg2
9 files changed, 149 insertions, 98 deletions
diff --git a/Makefile b/Makefile
index 7b4ce08..b41c068 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
DESTDIR=
-VERSION=2.2.1
+VERSION=2.5.0a1
VPATH = doc
install:
@@ -35,24 +35,22 @@ install-wireless:
install-docs: docs
install -d $(DESTDIR)/usr/share/doc/netcfg/contrib
- install -m644 doc/*html $(DESTDIR)/usr/share/doc/netcfg/
+ install -m644 docs/*html $(DESTDIR)/usr/share/doc/netcfg/
install -m644 contrib/* $(DESTDIR)/usr/share/doc/netcfg/contrib/
-docs: doc/*
- for doc in $(?); do \
- pandoc $$doc -o $$doc.html;\
- done
+docs:
+ cd docs; \
+ ./make.sh
tarball:
sed -i "s/NETCFG_VER=.*/NETCFG_VER=$(VERSION)/g" src/netcfg
mkdir -p netcfg-$(VERSION)
- cp -r src src-wireless examples contrib man Makefile LICENSE README netcfg-$(VERSION)
+ cp -r src src-wireless wpa_actiond examples contrib man Makefile LICENSE README netcfg-$(VERSION)
tar -zcvf netcfg-$(VERSION).tar.gz netcfg-$(VERSION)
- mv netcfg-$(VERSION).tar.gz ../
rm -rf netcfg-$(VERSION)
-upload:
+upload:
md5sum netcfg-$(VERSION)*gz > MD5SUMS.$(VERSION)
scp netcfg-$(VERSION)*gz MD5SUMS.$(VERSION) archlinux.org:/srv/ftp/other/netcfg/
diff --git a/doc/ethernet b/doc/ethernet
deleted file mode 100644
index 9ede84b..0000000
--- a/doc/ethernet
+++ /dev/null
@@ -1,46 +0,0 @@
-% ETHERNET netcfg manuals
-% Arch Linux
-%
-
-# ethernet Manual
-## Description
-This connection method uses the unmaintained net-tools (ifconfig) and dhcpcd to gain an IP address.
-
-## Options
-INTERFACE (required)
-: The wireless interface to configure
-IP (required)
-: Can be either 'static' or 'dhcp'. Static requires IFOPTS at least.
-IFOPTS
-: Arguments to pass to 'ifconfig'.
-GATEWAY (requires IP of 'static')
-: Set specified gateway
-### DNS
-DNS
-: Array of DNS nameservers. Simply specify the IP's of each of the DNS nameservers.
-DNS1, DNS2 (deprecated)
-: Specify first and second nameservers.
-SEARCH
-: "search" line for /etc/resolv.conf
-DOMAIN
-: "domain" line for /etc/resolv.conf
-HOSTNAME
-: Set the system hostname. Ensure any hostname is correctly referenced in /etc/hosts.
-### DHCP
-DHCLIENT
-: yes/no. Use dhclient instead of dhcpcd. Defaults to no.
-DHCP_OPTIONS
-: String. Any extra arguments to pass to the dhcp client, presently dhcpcd.
-DHCP_TIMEOUT
-: Integer. Maximum time to try for a DHCP IP. Default is 10 seconds.
-
-### 802.11x Authentication
-AUTH8021X
-: Use 802.11x authentication. Enable with 'yes'.
-WPA_CONF (required for an AUTH8021X of 'yes' only)
-: Path to wpa_supplicant configuration. Defaults to '/etc/wpa_supplicant.conf'
-WPA_OPTS (optional for an AUTH8021X of 'yes')
-: Extra arguments for wpa_supplicant not specified otherwise. Any option here must specify wpa_supplicant driver. Defaults to '-Dwired'.
-
-## Examples
-See /etc/network.d/examples
diff --git a/doc/wireless b/doc/wireless
deleted file mode 100644
index e1f649e..0000000
--- a/doc/wireless
+++ /dev/null
@@ -1,38 +0,0 @@
-% WIRELESS netcfg manuals
-% Arch Linux
-%
-
-# 'wireless' Connection manual
-## Description
-This connection method uses wireless_tools and wpa_supplicant to configure a wireless network connection.
-
-The new 'wireless-dbus' connection method is preferred over this
-
-This connection uses the 'ethernet' connection after successful association and thus supports all of it's options.
-
-## Options
-INTERFACE (required)
-: The wireless interface to configure
-SECURITY (required for security of 'wep', 'wpa' or 'wpa-config')
-: One of 'wpa', 'wep', 'none' or 'wpa-config'. Defaults to 'none'
-KEY (required for SECURITY of 'wpa' or 'wep' only)
-: Wireless encryption key.
-ESSID (this or AP is required)
-: Name of network to connect to.
-AP (this or ESSID is required)
-: AP of the network to connect to.
-TIMEOUT (optional)
-: Time to wait for association. Defaults to 15 seconds.
-SCAN (optional)
-: Scan for a wireless network rather than blindly attempting to connect. Hidden SSID networks do not appear in a scan. Enable with 'yes'. Defaults to 'no'.
-IWCONFIG (optional)
-: Arguments to pass to iwconfig before attempting to configure the connection. For example, BSSID.
-
-### WPA options
-WPA_CONF (for SECURITY of 'wpa-config' only)
-: Path to wpa_supplicant configuration. Defaults to '/etc/wpa_supplicant.conf'
-WPA_OPTS
-: Extra arguments for wpa_supplicant not specified otherwise. Any option here must specify wpa_supplicant driver. Defaults to '-Dwext'.
-WPA_GROUP
-: Group that has authority for on-the-fly config files created when SECURITY="wpa"
-
diff --git a/doc/ethernet-subr b/docs/ethernet
index 761505a..1781a03 100644
--- a/doc/ethernet-subr
+++ b/docs/ethernet
@@ -1,8 +1,8 @@
-% ETHERNET-IPROUTE netcfg manuals
+% Ethernet connections
% Arch Linux
%
-# ethernet-iproute Connection manual
+
## Description
This connection method uses the iproute suite of tools and dhcpcd to gain an IP address.
@@ -17,6 +17,8 @@ GATEWAY (requires IP of 'static')
: Set specified gateway
IPCFG
: Array of arguments to pass to 'ip'. The power of this options is that it allows both simple and complicated routing configurations, within the framework of netcfg.
+IFOPTS (deprecated, requires IP of 'static')
+: Arguments to pass to 'ifconfig'. This allows you to use the syntax for the older 'ifconfig' tool. Retained for compatability.
### DNS
DNS
: Array of DNS nameservers. Simply specify the IP's of each of the DNS nameservers.
@@ -26,12 +28,15 @@ DOMAIN
: "domain" line for /etc/resolv.conf
HOSTNAME
: Set the system hostname. Ensure any hostname is correctly referenced in /etc/hosts.
+DNS1, DNS2 (deprecated)
+: First and second DNS servers for /etc/resolv.conf
### DHCP
DHCP_OPTIONS
: String. Any extra arguments to pass to the dhcp client, presently dhcpcd.
DHCP_TIMEOUT
: Integer. Maximum time to try for a DHCP IP. Default is 10 seconds.
-
+DHCLIENT
+: yes/no. Use dhclient instead of dhcpcd. Defaults to no
### 802.11x Authentication
AUTH8021X
: Use 802.11x authentication. Enable with 'yes'.
diff --git a/docs/features b/docs/features
new file mode 100644
index 0000000..3a7f3c3
--- /dev/null
+++ b/docs/features
@@ -0,0 +1,80 @@
+% Netcfg feature documentation
+% James Rayner
+% 19/10/2009
+
+## Network Profile management
+
+netcfg is profile based. Each network has an individual profile. These profiles can be individually connected/disconnected at any time. The profile configuration varies depending on whether it's a wireless, ethernet (wired) or other type of connection. The available options are documented on the netcfg website and in the included examples. The installed and available connection types can be seen at /usr/lib/network/connections/
+
+To connect to a profile called 'mynetwork' which would be located at /etc/network.d/mynetwork, you may run:
+
+ netcfg mynetwork
+
+To disconnect from the same profile you could run one of:
+
+ netcfg -d mynetwork
+ netcfg down mynetwork
+
+To reconnect:
+
+ netcfg -r mynetwork
+
+For more options, see ''netcfg help''
+
+## Start a specific list of profiles on boot
+
+net-profiles allows you to start some profiles on boot. Specify the profiles you want netcfg to start in the NETWORKS line in /etc/rc.conf. For example:
+
+ NETWORKS=(home mywireless)
+
+To run on boot, add 'net-profiles' to your DAEMONS line.
+
+## Wireless automatic connection and roaming support
+
+Through the use of wpa_actiond which calls commands on a wpa_supplicant event, netcfg now has automatic connection and roaming support.
+
+To use this:
+
+1. Install core/wpa_actiond
+2. In /etc/rc.conf set WIRELESS_INTERFACE to your wireless interface, eg:
+
+ WIRELESS_INTERFACE="wlan0"
+
+3. Run /etc/rc.d/net-auto-wireless start
+
+To run on boot, add 'net-auto-wireles' to your DAEMONS line.
+
+## Per interface configuration
+
+Configuration that applies to all profiles using an interface can be set at /etc/network.d/interfaces/$INTERFACE. For example:
+
+ /etc/network.d/interfaces/eth0
+
+This is useful for wpa_supplicant options, radio kill switch support, pre/post up/down scripts and net-auto-wireless. It is loaded before a profile is loaded so that any profile based options will take priority.
+
+## Execute commands before/after interface up/down
+
+If your interface requires special actions prior/after the establishment/closure of a connection, you may use the PRE_UP, POST_UP, PRE_DOWN, POST_DOWN properties.
+For example, if you want to start daemon abc before connecting:
+
+ PRE_UP="/etc/rc.d/abc start"
+
+Or if you want to mount your network shares after a successful connection, you could use:
+
+ POST_UP="sleep 5; mount /mnt/shares/desktop 2>/dev/null;"
+
+If the commands specified in these properties return anything other than 0 (success), netcfg aborts the current operation. If you command might fail, create a separate bash script with an "exit 0;" at the end. Alternatively you may add "|| true" to the end of the command that may fail.
+
+## Output Hooks
+
+netcfg has limited support to load hooks that handle output. By default it loads the "arch" hook which provides the familiar output that you see. A syslog logging hook is also included. These can be found at /usr/lib/network/hooks
+
+## Menu based profile selection
+
+You may select a profile to connect to from a menu. This requires the 'dialog' package installed. To display a menu, simply run 'netcfg-menu'. If you wish to have a menu on boot, set NETWORKS=(menu) in your /etc/rc.conf and ensure that net-profiles is in the DAEMONS array.
+
+## Debugging
+
+To run netcfg with debugging output, set the NETCFG_DEBUG environment variable to "yes", for example:
+
+ NETCFG_DEBUG="yes" netcfg <arguments>
diff --git a/docs/make.sh b/docs/make.sh
new file mode 100755
index 0000000..b101117
--- /dev/null
+++ b/docs/make.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+PAGES=(index ethernet features wireless)
+
+for page in ${PAGES[@]}; do
+ rm ${page}.html
+ pandoc -s --toc -w html --email-obfuscation=javascript -c header.css -o ${page}.html $page
+done
diff --git a/docs/wireless b/docs/wireless
new file mode 100644
index 0000000..30d9b28
--- /dev/null
+++ b/docs/wireless
@@ -0,0 +1,43 @@
+% WIRELESS netcfg manuals
+% Arch Linux
+%
+
+# 'wireless' Connection manual
+## Description
+This connection method uses wpa_supplicant to configure a wireless network connection. This connection uses the 'ethernet' connection after successful association and thus supports all of it's options.
+
+## Options
+INTERFACE (required)
+: The wireless interface to configure
+SECURITY (required for security of 'wep', 'wpa', 'wpa-configsection' or 'wpa-config')
+: One of 'wpa', 'wep', 'none', 'wpa-configsection' or 'wpa-config'. Defaults to 'none'. Old iwconfig based configuration code can be used with 'wep-old' and 'none-old'.
+KEY (required for SECURITY of 'wpa' or 'wep' only)
+: Wireless encryption key.
+ESSID (this or AP is required)
+: Name of network to connect to.
+AP (this or ESSID is required)
+: AP of the network to connect to.
+TIMEOUT (optional)
+: Time to wait for association. Defaults to 15 seconds.
+SCAN (optional)
+: yes/no Scan for a wireless network rather than blindly attempting to connect. Hidden SSID networks do not appear in a scan.
+IWCONFIG (optional)
+: Arguments to pass to iwconfig before attempting to configure the connection. For example, BSSID.
+
+### WPA options
+WPA_CONF (for SECURITY of 'wpa-config' only)
+: Path to wpa_supplicant configuration. Defaults to '/etc/wpa_supplicant.conf'
+WPA_OPTS
+: Extra arguments for wpa_supplicant not specified otherwise.
+WPA_GROUP
+: Group that has authority to configure wpa_supplicant via it's control interface. Used in any configuration that is generated by netcfg.
+WPA_COUNTRY (optional, nl80211 based drivers)
+: The country where the device will be used. This allows wpa_supplicant to enforce any local regulatory limitations and will allow all appropriate channels/frequencies for your device.
+WPA_DRIVER (optional)
+: The wpa_supplicant driver interface to be used. Defaults to 'wext'. nl80211 based drivers are recommended to use 'nl80211'
+
+### rfkill (Radio Kill Switch) options
+RFKILL
+: hard/soft A switch with physical on/off state that cannot be controlled via software is considered a 'hard' switch. Any switch that can be controlled via software is considered 'soft'.
+RFKILL_NAME
+: Some switches sysfs entries are not linked with the interface. To match them up, configure the name from /sys/class/rfkill/rfkillX/name here so that netcfg can identify which to control.
diff --git a/doc/wireless-dbus b/docs/wireless-dbus
index 886ea16..fc91f78 100644
--- a/doc/wireless-dbus
+++ b/docs/wireless-dbus
@@ -6,7 +6,9 @@
## Description
This connection method uses wpa_supplicant's dbus interface to configure a wireless network connection.
-This connection uses the 'ethernet-iproute' connection after successful association and thus supports all of it's options.
+This connection uses the 'ethernet' connection after successful association and thus supports all of it's options.
+
+This is presently unmaintained and unsupported.
## Options
INTERFACE (required)
diff --git a/src/netcfg b/src/netcfg
index fd589b0..b9011af 100644
--- a/src/netcfg
+++ b/src/netcfg
@@ -2,7 +2,7 @@
. /usr/lib/network/network
-NETCFG_VER=2.2.1
+NETCFG_VER=2.5.0a1
version()
{