diff options
author | James Rayner <james@archlinux.org> | 2007-12-29 13:47:17 +0100 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2007-12-29 13:47:17 +0100 |
commit | dc101daef771eaab94ed00f87a69612e60c73c11 (patch) | |
tree | c9cc874a18f67707d79c4ce384ad44c7cba76ce1 /src/net-profiles | |
parent | 2fc0a5d9baae63773cf7675b60459a85063279d5 (diff) | |
download | netctl-dc101daef771eaab94ed00f87a69612e60c73c11.tar.gz netctl-dc101daef771eaab94ed00f87a69612e60c73c11.tar.xz |
Small new features & tidying
* Tidied: auto-wireless support
* Added: Explicitly specify menu default via NETWORKS_MENU_DEFAULT
* Added: Explicitly set menu timeout with NETWORKS_MENU_TIMEOUT
* Added: Recording of last profile as $PROFILE_DIR/last
* Tidied: /etc/rc.d/net-profiles
Diffstat (limited to 'src/net-profiles')
-rwxr-xr-x | src/net-profiles | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/net-profiles b/src/net-profiles index 9967b6e..f9c2875 100755 --- a/src/net-profiles +++ b/src/net-profiles @@ -20,14 +20,16 @@ case "$1" in done # $NET env var is passed from the kernel boot line - if [ "$NET" = "menu" -o "$NETWORKS" = "menu" ]; then - /usr/bin/netcfg-menu 5 + [ ! "$NETWORKS_MENU_TIMEOUT" ] && NETWORKS_MENU_TIMEOUT=5 + + if [ "$NET" = "menu" -o "$NETWORKS" = "menu" ]; then + /usr/bin/netcfg-menu $NETWORKS_MENU_TIMEOUT elif [ "$NET" ]; then /usr/bin/netcfg2 $NET - elif [ "${NETWORKS[0]}" = "auto" ]; then - if [ "${NETWORKS[1]}" ]; then - /usr/bin/netcfg-wireless-auto ${NETWORKS[1]} - fi + elif [ "${NETWORKS[0]}" = "auto-wireless" ]; then + if [ "${NETWORKS[1]}" ]; then + /usr/bin/netcfg-auto-wireless ${NETWORKS[1]} + fi elif [ "$NETWORKS" ]; then for prof in ${NETWORKS[@]}; do if [ "$prof" = "${prof#!}" ]; then @@ -37,25 +39,17 @@ case "$1" in fi add_daemon net-profiles - ;; stop) # shutdown any profiles started by netcfg (or from NET_PROFILES in rc.conf) - status "Stopping Network Profiles" /usr/bin/netcfg2 -a + /usr/bin/netcfg2 -a rm_daemon net-profiles ;; restart) - $0 stop - /bin/sleep 1 - $0 start - ;; - hotplug_ifup|ifup|ifdown|iflist|rtup|rtdown|rtlist) - $1 $2 + $0 stop; sleep 1; $0 start ;; *) echo "usage: $0 {start|stop|restart}" - echo " $0 {ifup|ifdown|iflist|rtup|rtdown|rtlist}" esac # vim: set ts=2 noet: -# vim: set ts=4 et sw=4: |