From bc66a6906c5a1a55c5c9adc7c69f2370327db139 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Tue, 10 Apr 2012 18:23:30 +0200 Subject: Remove multi-version support Having multiple versions of netcfg around is not supported. --- Makefile | 3 +-- contrib/bash-completion | 1 - contrib/zsh-completion | 2 +- rc.d/net-profiles | 8 ++++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7f71362..15f28f8 100644 --- a/Makefile +++ b/Makefile @@ -16,9 +16,8 @@ install: install-docs install -m755 src/hooks/* ${DESTDIR}/usr/lib/network/hooks/ # Scripts install -d $(DESTDIR)/usr/bin - install -m755 scripts/netcfg $(DESTDIR)/usr/bin/netcfg2 - -ln -s netcfg2 $(DESTDIR)/usr/bin/netcfg install -m755 \ + scripts/netcfg \ scripts/netcfg-menu \ scripts/netcfg-wpa_actiond \ scripts/netcfg-wpa_actiond-action \ diff --git a/contrib/bash-completion b/contrib/bash-completion index f7273aa..dab52ea 100644 --- a/contrib/bash-completion +++ b/contrib/bash-completion @@ -47,4 +47,3 @@ _netcfg () } complete -F _netcfg netcfg -complete -F _netcfg netcfg2 diff --git a/contrib/zsh-completion b/contrib/zsh-completion index 8d05ee4..e05e183 100644 --- a/contrib/zsh-completion +++ b/contrib/zsh-completion @@ -1,4 +1,4 @@ -#compdef netcfg netcfg2=netcfg +#compdef netcfg local -a disp all_options() { diff --git a/rc.d/net-profiles b/rc.d/net-profiles index e8b8bc7..be77bac 100755 --- a/rc.d/net-profiles +++ b/rc.d/net-profiles @@ -29,7 +29,7 @@ case "$1" in exit 0 fi elif [[ -n "$NET" ]]; then - if /usr/bin/netcfg2 check-iface "$NET"; then + if /usr/bin/netcfg check-iface "$NET"; then echo "$NET" > "$STATE_DIR/net-profiles" # JP: user may want to disconnect profile by calling net-profiles stop add_daemon net-profiles exit 0 @@ -44,14 +44,14 @@ case "$1" in # No NET= passed at boot, go to NETWORKS=() for network in "${NETWORKS[@]}"; do if [[ "$network" = "${network#@}" ]]; then - if /usr/bin/netcfg2 check-iface "$network"; then + if /usr/bin/netcfg check-iface "$network"; then echo "$network" >> "$STATE_DIR/net-profiles" add_daemon net-profiles fi else # It is up to the user to make sure no backgrounded profile # uses an interface that is used by another active profile. - if /usr/bin/netcfg2 "${network#@}"; then + if /usr/bin/netcfg "${network#@}"; then echo "${network#@}" >> "$STATE_DIR/net-profiles" add_daemon net-profiles fi >/dev/null & @@ -71,7 +71,7 @@ case "$1" in # shutdown any profiles started by netcfg (or from NET_PROFILES in rc.conf) # JP: only attempt to disconnect the profiles _this daemon_ was told to control while read profile; do - /usr/bin/netcfg2 down "$profile" + /usr/bin/netcfg down "$profile" done < "$STATE_DIR/net-profiles" rm -f "$STATE_DIR/net-profiles" rm_daemon net-profiles -- cgit v1.2.3-24-g4f1b