/[gentoo-x86]/autoinstaller.sh
Gentoo

Contents of /autoinstaller.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download) (as text)
Fri Aug 10 14:44:54 2001 UTC (12 years, 11 months ago) by pete
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +0 -0 lines
File MIME type: text/x-sh
FILE REMOVED
these files are now under scripts/

1 #! /bin/bash
2
3 if [ "$ROOT" = "" ]
4 then
5 echo "Please set \$ROOT to the gentoo-linux install directory first."
6 exit
7 fi
8
9 . ${ROOT}/etc/rc.d/config/functions
10 . ${ROOT}/etc/rc.d/config/runlevels
11 . $1
12
13 cp $1 ${ROOT}/var/db/pkg/install.config
14
15 if [ -z "$NODEV" ] ; then
16 echo "Now setting up $OSNAME..."
17 echo "Creating device nodes (this takes a minute or so)..."
18 cd ${ROOT}/dev
19 ${ROOT}/usr/sbin/MAKEDEV generic-i386
20 ${ROOT}/usr/sbin/MAKEDEV sg
21 ${ROOT}/usr/sbin/MAKEDEV scd
22 ${ROOT}/usr/sbin/MAKEDEV rtc
23 fi
24 echo
25 echo "Setting osname and architecture"
26 cp ${ROOT}/etc/rc.d/config/runlevels ${ROOT}/etc/rc.d/config/runlevels.orig
27 sed -e "s:##OSNAME##:$OSNAME:" -e "s:##ARCH##:$ARCH:" \
28 ${ROOT}/etc/rc.d/config/runlevels.orig > ${ROOT}/etc/rc.d/config/runlevels
29 echo "OSNAME: $OSNAME"
30 echo "ARCH: $ARCH"
31 echo
32 echo "Now, we are getting ${ROOT}/etc/fstab set up for your root and swap partitions..."
33 cp ${ROOT}/etc/fstab ${ROOT}/etc/fstab.orig
34
35
36 echo "Root partition in /dev/$MYROOTPART"
37 echo "Swap partition in /dev/$MYSWAPPART"
38
39 sed -e "s:#ROOT#:${MYROOTPART}:" -e "s:#SWAP#:${MYSWAPPART}:" ${ROOT}/etc/fstab.orig > ${ROOT}/etc/fstab
40
41 echo "Generating library links and cache..."
42 cp ${ROOT}/etc/env.d/00basic ${ROOT}/etc/env.d/00basic.orig
43 sed -e "s/i686-pc-linux-gnu/$ARCH/" ${ROOT}/etc/env.d/00basic.orig > ${ROOT}/etc/env.d/00basic
44
45 ${ROOT}/usr/sbin/env-update
46
47 case "$GMT" in
48 n|N|No|no)
49 echo "Your BIOS clock is set to localtime"
50 ;;
51 y|Y|Yes|yes)
52 echo "Your BIOS clock is set to GMT"
53 mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak
54 sed -e "s/GMT=no/GMT=yes/" ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic
55 rm ${ROOT}/etc/rc.d/config/basic.bak
56 esac
57
58
59 echo "Keymap: $keymap"
60 mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak
61 sed -e "s/KEYMAP=.*/KEYMAP=\"$keymap\"/" \
62 -e "s/CONSOLEFONT=.*/CONSOLEFONT=\"$consolefont\"/" \
63 ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic
64 mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak
65 sed -e "s/TIMED=.*/TIMED=\"$timed\"/" \
66 ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic
67
68
69 myzone="${ROOT}/usr/share/zoneinfo/$timezone"
70 echo "Timezone: $timezone"
71
72
73 cp ${myzone} ${ROOT}/etc/localtime
74
75 echo "Hostname: $hostname"
76
77 echo "$hostname" > ${ROOT}/etc/hostname
78 echo -n "domain " > ${ROOT}/etc/resolv.conf
79 echo "$hostname" | cut -f2- -d. >> ${ROOT}/etc/resolv.conf
80 echo "127.0.0.1 localhost" >> ${ROOT}/etc/hosts
81 echo "$eth0_ip ${hostname%%.*} ${hostname}" >> ${ROOT}/etc/hosts
82
83 echo "nameserver $nameserver" >> ${ROOT}/etc/resolv.conf
84
85 if [ -n $eth0 ] ; then
86 cp ${ROOT}/etc/rc.d/config/modules ${ROOT}/etc/rc.d/config/modules.orig
87 sed -e "s/\#eth0/$eth0/" ${ROOT}/etc/rc.d/config/modules.orig > ${ROOT}/etc/rc.d/config/modules
88 sed -e "s/IPNUM=.*/IPNUM=$eth0_ip/" -e "s/BCAST=.*/BCAST=$eth0_bcast/" \
89 -e "s/NMASK=.*/NMASK=$eth0_mask/" -e "s/NETWK=.*/NETWK=$eth0_net/" \
90 -e "s/GTWAY=.*/GTWAY=$eth0_gw/" \
91 ${ROOT}/etc/rc.d/config/OFF_inet.eth0 > ${ROOT}/etc/rc.d/config/inet.eth0
92 fi
93
94 ${ROOT}/etc/rc.d/init.d/initscripts-install

  ViewVC Help
Powered by ViewVC 1.1.20