/[gentoo-x86]/autoinstaller.sh
Gentoo

Contents of /autoinstaller.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download) (as text)
Fri Dec 8 13:32:22 2000 UTC (17 years, 6 months ago) by achim
Branch: MAIN
Changes since 1.2: +5 -2 lines
File MIME type: text/x-sh
*** empty log message ***

1 achim 1.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 drobbins 1.2 echo "Now setting up $OSNAME..."
17     echo "Creating device nodes (this takes a minute or so)..."
18 achim 1.1 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 drobbins 1.2 echo "Setting osname and architecture"
26 achim 1.1 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 drobbins 1.2 echo "Now, we are getting ${ROOT}/etc/fstab set up for your root and swap partitions..."
33 achim 1.1 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 drobbins 1.2 echo "Generating library links and cache..."
42 achim 1.1 ldconfig -r ${ROOT}
43    
44     case "$GMT" in
45     n|N|No|no)
46     echo "Your BIOS clock is set to localtime"
47     ;;
48     y|Y|Yes|yes)
49     echo "Your BIOS clock is set to GMT"
50     mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak
51     sed -e "s/GMT=no/GMT=yes/" ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic
52     rm ${ROOT}/etc/rc.d/config/basic.bak
53     esac
54    
55    
56     echo "Keymap: $keymap"
57     mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak
58 achim 1.3 sed -e "s/KEYMAP=.*/KEYMAP=\"$keymap\"/" \
59     -e "s/CONSOLEFONT=.*/CONSOLEFONT=\"$consolefont\"/" \
60     ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic
61 achim 1.1 mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak
62 achim 1.3 sed -e "s/TIMED=.*/TIMED=\"$timed\"/" \
63     ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic
64 achim 1.1
65    
66     myzone="${ROOT}/usr/share/zoneinfo/$timezone"
67     echo "Timezone: $timezone"
68    
69    
70     cp ${myzone##${ROOT}} ${ROOT}/etc/localtime
71    
72     echo "Hostname: $hostname"
73    
74     echo "$hostname" > ${ROOT}/etc/hostname
75     echo -n "domain " > ${ROOT}/etc/resolv.conf
76     echo "$hostname" | cut -f2- -d. >> ${ROOT}/etc/resolv.conf
77     echo "127.0.0.1 localhost ${hostname%%.*} ${hostname}" >> ${ROOT}/etc/hosts
78    
79     echo "nameserver $nameserver" >> ${ROOT}/etc/resolv.conf
80    
81     if [ -n $eth0 ] ; then
82     cp ${ROOT}/etc/rc.d/config/modules ${ROOT}/etc/rc.d/config/modules.orig
83     sed -e "s/\#eth0/$eth0/" ${ROOT}/etc/rc.d/config/modules.orig > ${ROOT}/etc/rc.d/config/modules
84     sed -e "s/IPNUM=.*/IPNUM=$eth0_ip/" -e "s/BCAST=.*/BCAST=$eth0_bcast/" \
85     -e "s/NMASK=.*/NMASK=$eth0_mask/" -e "s/NETWK=.*/NETWK=$eth0_net/" \
86     -e "s/GTWAY=.*/GTWAY=$eth0_gw/" \
87     ${ROOT}/etc/rc.d/config/OFF_inet.eth0 > ${ROOT}/etc/rc.d/config/inet.eth0
88     fi
89    
90     ${ROOT}/etc/rc.d/init.d/initscripts-install
91    
92    
93    
94    
95    
96    
97    
98    
99    

  ViewVC Help
Powered by ViewVC 1.1.20