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

Contents of /trunk/net-setup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55 - (show annotations) (download)
Thu Jun 9 15:31:23 2005 UTC (9 years, 5 months ago) by wolf31o2
File size: 1177 byte(s)
Updated to work with newer baselayout versions and also to write configuration to livecd's /etc/conf.d files.

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.17 2005/06/09 15:31:23 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 livecd_check_root || exit 1
15
16 if [ -z "${1}" ]
17 then
18 echo "ERROR: please specify a network interface"
19 exit 1
20 else
21 iface="${1}"
22 fi
23
24 [ ! -d /tmp/setup.opts ] && mkdir /tmp/setup.opts
25 cd /tmp/setup.opts
26
27 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
28 WIRED_WIRELESS="$(cat ${iface}.WIRED_WIRELESS)"
29 case ${WIRED_WIRELESS} in
30 1)
31 livecd_config_wireless
32 livecd_config_ip
33 livecd_write_wireless_conf
34 ;;
35 2)
36 livecd_config_ip
37 ;;
38 *)
39 exit 0
40 ;;
41 esac
42 livecd_write_net_conf
43
44 echo "Type \"ifconfig\" to make sure the interface was configured correctly."
45
46 # vim: ts=4

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20