/[livecd-tools]/trunk/net-setup
Gentoo

Contents of /trunk/net-setup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103 - (show annotations) (download)
Tue May 30 19:50:59 2006 UTC (8 years, 1 month ago) by wolf31o2
File size: 1293 byte(s)
Check for presence of dialog before running.  Suggestion made by Markus Saarinen <heroine@saunalahti.fi> in bug #134486.

1 #!/bin/bash
2 # Copyright 1999-2005 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header: /var/cvsroot/gentoo/src/livecd-tools/net-setup,v 1.18 2006/05/30 19:50:59 wolf31o2 Exp $
5
6 if [ -f /sbin/livecd-functions.sh ]
7 then
8 source /sbin/livecd-functions.sh
9 else
10 echo "ERROR: /sbin/livecd-functions.sh could not be loaded!"
11 exit 1
12 fi
13
14 if [ ! -x $(which dialog) ]
15 then
16 echo "ERROR: The dialog utility is required for net-setup. Exiting!"
17 exit 1
18 fi
19
20 livecd_check_root || exit 1
21
22 if [ -z "${1}" ]
23 then
24 echo "ERROR: please specify a network interface"
25 exit 1
26 else
27 iface="${1}"
28 fi
29
30 [ ! -d /tmp/setup.opts ] && mkdir /tmp/setup.opts
31 cd /tmp/setup.opts
32
33 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
34 WIRED_WIRELESS="$(cat ${iface}.WIRED_WIRELESS)"
35 case ${WIRED_WIRELESS} in
36 1)
37 livecd_config_wireless
38 livecd_config_ip
39 livecd_write_wireless_conf
40 ;;
41 2)
42 livecd_config_ip
43 ;;
44 *)
45 exit 0
46 ;;
47 esac
48 livecd_write_net_conf
49
50 echo "Type \"ifconfig\" to make sure the interface was configured correctly."
51
52 # vim: ts=4

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20