/[gentoo-x86]/autoinstaller.sh
Gentoo

Contents of /autoinstaller.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download) (as text)
Sat Jan 13 20:07:52 2001 UTC (17 years, 5 months ago) by achim
Branch: MAIN
Changes since 1.4: +3 -0 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.5 cp ${ROOT}/etc/ld.so.conf ${ROOT}/etc/ld.so.orig
43     sed -e "s/i686-pc-linux-gnu/$ARCH/" ${ROOT}/etc/ld.so.orig > ${ROOT}/etc/ld.so.conf
44    
45 achim 1.1 ldconfig -r ${ROOT}
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 achim 1.3 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 achim 1.1 mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak
65 achim 1.3 sed -e "s/TIMED=.*/TIMED=\"$timed\"/" \
66     ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic
67 achim 1.1
68    
69     myzone="${ROOT}/usr/share/zoneinfo/$timezone"
70     echo "Timezone: $timezone"
71    
72    
73 achim 1.4 cp ${myzone} ${ROOT}/etc/localtime
74 achim 1.1
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 ${hostname%%.*} ${hostname}" >> ${ROOT}/etc/hosts
81    
82     echo "nameserver $nameserver" >> ${ROOT}/etc/resolv.conf
83    
84     if [ -n $eth0 ] ; then
85     cp ${ROOT}/etc/rc.d/config/modules ${ROOT}/etc/rc.d/config/modules.orig
86     sed -e "s/\#eth0/$eth0/" ${ROOT}/etc/rc.d/config/modules.orig > ${ROOT}/etc/rc.d/config/modules
87     sed -e "s/IPNUM=.*/IPNUM=$eth0_ip/" -e "s/BCAST=.*/BCAST=$eth0_bcast/" \
88     -e "s/NMASK=.*/NMASK=$eth0_mask/" -e "s/NETWK=.*/NETWK=$eth0_net/" \
89     -e "s/GTWAY=.*/GTWAY=$eth0_gw/" \
90     ${ROOT}/etc/rc.d/config/OFF_inet.eth0 > ${ROOT}/etc/rc.d/config/inet.eth0
91     fi
92    
93     ${ROOT}/etc/rc.d/init.d/initscripts-install
94    
95    
96    
97    
98    
99    
100    
101    
102    

  ViewVC Help
Powered by ViewVC 1.1.20