summaryrefslogtreecommitdiffstats
path: root/src/netcfg-menu
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2007-12-29 13:47:17 +0100
committerJames Rayner <james@archlinux.org>2007-12-29 13:47:17 +0100
commitdc101daef771eaab94ed00f87a69612e60c73c11 (patch)
treec9cc874a18f67707d79c4ce384ad44c7cba76ce1 /src/netcfg-menu
parent2fc0a5d9baae63773cf7675b60459a85063279d5 (diff)
downloadnetctl-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/netcfg-menu')
-rwxr-xr-xsrc/netcfg-menu3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/netcfg-menu b/src/netcfg-menu
index 0970a01..4da1291 100755
--- a/src/netcfg-menu
+++ b/src/netcfg-menu
@@ -4,6 +4,7 @@
. /etc/rc.d/functions
. /usr/lib/network/network.subr
+
# Scan all profiles
i=0
for prof in `find -L $PROFILE_DIR -maxdepth 1 -type f -printf "%f\n"`; do
@@ -23,6 +24,8 @@ if [ ${#profiles} -eq 0 ]; then
fi
# if no default yet, use the first entry
+[ "$NETWORKS_MENU_DEFAULT" ] && DEFAULT="$NETWORKS_MENU_DEFAULT"
+
[ "$DEFAULT" = "" ] && DEFAULT=${profiles[0]}
ANSWER=$(mktemp) || exit 1