diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2012-03-03 20:11:43 +0100 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-03-03 20:11:43 +0100 |
commit | 4ed88705b8ea1dae9adc109b71ef35624a9faccd (patch) | |
tree | 642f9faed4e9881925d0d59d9ef51a26d81fdcfd /src | |
parent | eed3f590c9db7cd9cd4d5fb4722fc7257a278ea6 (diff) | |
download | netctl-4ed88705b8ea1dae9adc109b71ef35624a9faccd.tar.gz netctl-4ed88705b8ea1dae9adc109b71ef35624a9faccd.tar.xz |
Remove deprecated code
Remove some code that should not be used anymore. A 2.7 release seems the right point for some minor interface breaking.
Diffstat (limited to 'src')
-rw-r--r-- | src/8021x | 4 | ||||
-rw-r--r-- | src/connections/ethernet | 21 | ||||
-rw-r--r-- | src/connections/openvpn | 8 | ||||
-rw-r--r-- | src/connections/wireless | 7 |
4 files changed, 4 insertions, 36 deletions
@@ -178,11 +178,7 @@ make_wpa_config_file() { # make empty tmp dir with correct permissions, rename it check_make_state_dir - # create symlink for old compatibility (Jouke: is this still needed?) mkdir -p /run/wpa_supplicant - if [[ ! -e /var/run/wpa_supplicant ]]; then - ln -s /run/wpa_supplicant /var/run - fi rm -rf "$WPA_CONF" mv -f "$(mktemp -d --tmpdir=$STATE_DIR)" "$WPA_CONF" || return 1 echo "ctrl_interface=/run/wpa_supplicant" >> "$WPA_CONF/wpa.conf" # we know $WPA_CONF now has no spaces, but it may have other nasty chars, so still needs to be quoted diff --git a/src/connections/ethernet b/src/connections/ethernet index 8be3c6f..8665816 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -44,7 +44,7 @@ ethernet_up() { [[ -z "$WPA_CONF" ]] && WPA_CONF="/etc/wpa_supplicant.conf" [[ -z "$WPA_DRIVER" ]] && WPA_DRIVER="wired" # Set wpa_supplicant control path (FS#25473) - WPA_CTRL_PATH=/var/run/wpa_supplicant + WPA_CTRL_PATH=/run/wpa_supplicant if grep "^ *ctrl_interface=" "$WPA_CONF" &>/dev/null; then WPA_CTRL_PATH=$(grep -m 1 "^ *ctrl_interface=" "$WPA_CONF" | tail -n 1 | cut -d= -f 2- | sed -r 's/DIR=(.*) +GROUP=.*/\1/') fi @@ -79,9 +79,9 @@ ethernet_up() { fi else # Clear remaining pid files. - rm -f "/var/run/dhcpcd-$INTERFACE".{pid,cache} >/dev/null 2>&1 + rm -f "/run/dhcpcd-$INTERFACE".{pid,cache} >/dev/null 2>&1 # If using own dns, tell dhcpcd to NOT replace resolv.conf - [[ -n "$DNS1" || -n "$DNS" ]] && DHCP_OPTIONS="-C resolv.conf $DHCP_OPTIONS" + [[ -n "$DNS" ]] && DHCP_OPTIONS="-C resolv.conf $DHCP_OPTIONS" # Start dhcpcd report_debug ethernet_up dhcpcd -qL -t "${DHCP_TIMEOUT:-10}" $DHCP_OPTIONS "$INTERFACE" dhcpcd -qL -t "${DHCP_TIMEOUT:-10}" $DHCP_OPTIONS "$INTERFACE" 2>&1 | report_debug "$(cat)" @@ -100,12 +100,6 @@ ethernet_up() { report_iproute "Could not configure interface" fi fi - if [[ -n "$IFOPTS" ]]; then - if ! ifconfig "$INTERFACE" $IFOPTS up; then - report_iproute "Bringing interface up failed." - return 1 - fi - fi if [[ -n "$ROUTES" ]]; then for route in "${ROUTES[@]}"; do report_debug ethernet_iproute_up ip route add $route dev "$INTERFACE" @@ -219,16 +213,9 @@ ethernet_up() { : >/etc/resolv.conf [[ -n "$DOMAIN" ]] && echo "domain $DOMAIN" >>/etc/resolv.conf [[ -n "$SEARCH" ]] && echo "search $SEARCH" >>/etc/resolv.conf - for dns in "${DNS[@]}"; do echo "nameserver $dns" >>/etc/resolv.conf done - elif [[ -n "$DNS1" ]]; then # support older 'ethernet' syntax. - : >/etc/resolv.conf - [[ -n "$DOMAIN" ]] && echo "domain $DOMAIN" >>/etc/resolv.conf - [[ -n "$SEARCH" ]] && echo "search $SEARCH" >>/etc/resolv.conf - [[ -n "$DNS1" ]] && echo "nameserver $DNS1" >>/etc/resolv.conf - [[ -n "$DNS2" ]] && echo "nameserver $DNS2" >>/etc/resolv.conf fi return 0 @@ -247,7 +234,7 @@ ethernet_down() { /bin/kill $(cat /run/dhclient-$INTERFACE.pid) &>/dev/null fi else - if [[ -f "/var/run/dhcpcd-$INTERFACE.pid" ]]; then + if [[ -f "/run/dhcpcd-$INTERFACE.pid" ]]; then report_debug ethernet_down dhcpcd -qk "$INTERFACE" dhcpcd -qk "$INTERFACE" &>/dev/null fi diff --git a/src/connections/openvpn b/src/connections/openvpn index ded6bf5..cb0adde 100644 --- a/src/connections/openvpn +++ b/src/connections/openvpn @@ -25,17 +25,9 @@ openvpn_up() { : >/etc/resolv.conf [[ -n "$DOMAIN" ]] && echo "domain $DOMAIN" >>/etc/resolv.conf [[ -n "$SEARCH" ]] && echo "search $SEARCH" >>/etc/resolv.conf - for dns in "${DNS[@]}"; do echo "nameserver $dns" >>/etc/resolv.conf done - elif [[ -n "$DNS1" ]]; then # support older 'ethernet' syntax. - [[ -e /etc/resolv.conf ]] && cp /etc/resolv.conf /tmp/openvpn-$1-resolv.conf - : >/etc/resolv.conf - [[ -n "$DOMAIN" ]] && echo "domain $DOMAIN" >>/etc/resolv.conf - [[ -n "$SEARCH" ]] && echo "search $SEARCH" >>/etc/resolv.conf - [[ -n "$DNS1" ]] && echo "nameserver $DNS1" >>/etc/resolv.conf - [[ -n "$DNS2" ]] && echo "nameserver $DNS2" >>/etc/resolv.conf fi } diff --git a/src/connections/wireless b/src/connections/wireless index f08ba43..2e371c9 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -62,13 +62,6 @@ wireless_up() { report_debug wireless_up stop_wpa "$INTERFACE" stop_wpa "$INTERFACE" - # Manually set iwconfig options (DEPRECATED) - if [[ -n "$IWCONFIG" ]]; then - report_warn "The use of IWCONFIG option is deprecated." - report_debug wireless_up iwconfig "$INTERFACE" $IWCONFIG - iwconfig "$INTERFACE" $IWCONFIG - fi - # Build configuration file case "$SECURITY" in wpa-config) |