summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2006-05-30 20:20:11 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2006-05-30 20:20:11 +0000
commitdc5c5d86be35a2706936b16d03dc25b89eb77741 (patch)
tree9d9bca23f606112b5aa4c8692dcd835a1550040b /net-setup
parentCheck for presence of dialog before running. Suggestion made by Markus Saari... (diff)
downloadlivecd-tools-dc5c5d86be35a2706936b16d03dc25b89eb77741.tar.gz
livecd-tools-dc5c5d86be35a2706936b16d03dc25b89eb77741.tar.bz2
livecd-tools-dc5c5d86be35a2706936b16d03dc25b89eb77741.zip
Added patch from Daniel Drake <dsd@gentoo.org> to simplify network setup on 2.6 kernels. You 2.4 suckas bettah recognize... This is for bug #133955.
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/livecd-tools/trunk@104 7bf51bff-881f-0410-a643-fba68b97345e
Diffstat (limited to 'net-setup')
-rwxr-xr-xnet-setup18
1 files changed, 15 insertions, 3 deletions
diff --git a/net-setup b/net-setup
index af673f2..357cbe7 100755
--- a/net-setup
+++ b/net-setup
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/livecd-tools/net-setup,v 1.18 2006/05/30 19:50:59 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/livecd-tools/net-setup,v 1.19 2006/05/30 20:20:11 wolf31o2 Exp $
if [ -f /sbin/livecd-functions.sh ]
then
@@ -19,10 +19,13 @@ fi
livecd_check_root || exit 1
+# Hide any potential error messages from the readlink/dirname/etc calls below
+exec 2>/dev/null
+
if [ -z "${1}" ]
then
- echo "ERROR: please specify a network interface"
- exit 1
+ show_ifmenu
+ echo $iface
else
iface="${1}"
fi
@@ -30,6 +33,15 @@ fi
[ ! -d /tmp/setup.opts ] && mkdir /tmp/setup.opts
cd /tmp/setup.opts
+while true; do
+ show_ifconfirm $iface
+ [[ $result == "yes" ]] && break
+ show_ifmenu
+done
+
+# Show stderr again
+exec 2>/dev/stderr
+
dialog --title "Network setup" --menu "This script is designed to setup both wired and wireless network settings. All questions below apply to the ${iface} interface only. Choose one option:" 20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS
WIRED_WIRELESS="$(cat ${iface}.WIRED_WIRELESS)"
case ${WIRED_WIRELESS} in