From dc5c5d86be35a2706936b16d03dc25b89eb77741 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Tue, 30 May 2006 20:20:11 +0000 Subject: Added patch from Daniel Drake 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 --- net-setup | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'net-setup') 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 -- cgit v1.2.3-65-gdbad