1 # $NetBSD: dot.instutils,v 1.7 2000/06/14 17:24:47 cgd Exp $
3 # Copyright (c) 1994 Christopher G. Demetriou
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
14 # 3. All advertising materials mentioning features or use of this software
15 # must display the following acknowledgement:
16 # This product includes software developed for the
17 # NetBSD Project. See http://www.NetBSD.org/ for
18 # information about NetBSD.
19 # 4. The name of the author may not be used to endorse or promote products
20 # derived from this software without specific prior written permission.
22 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 # <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
35 # Installation configuration utilities (functions), to get NetBSD configured
36 # reasonably once it is installed on the hard disk. These are meant to be
37 # invoked from the shell prompt, by people installing NetBSD.
41 local intf resp ifname ifaddr ifflags
51 echo -n "Configure" $intf "? [y]"
61 echo -n "What is the hostname for this interface? [$hname] "
63 if [ "$ifname" = "" ]; then
67 while [ "$ifaddr" = "" ]; do
68 echo -n "What is the IP address associated with "
69 echo -n "interface ${intf}? "
72 echo "$ifaddr $ifname `echo $ifname | sed -e s/\.$dname//`" \
75 echo -n "Does this interface have a special netmask? [n] "
79 echo -n "What is the netmask? [0xffffff00] "
81 if [ "$ifnetmask" = "" ]; then
84 ifnetmask_arg="netmask $ifnetmask"
92 echo -n "Does this interface need a special media type? [n] "
96 echo -n "What media type? [10baseT/UTP] "
98 if [ "$ifflags" = "" ]; then
101 ifflags_arg="media $ifflags"
108 echo "inet $ifname $ifnetmask_arg $ifflags_arg" > ${ETC}/ifconfig.$intf
117 if [ ! -f /etc/fstab ]; then
123 echo "You will now be prompted for information about this"
124 echo "machine. If you hit return, the default answer (in"
125 echo "brackets) will be used."
128 echo -n "What is this machine's hostname? [unknown.host.domain] "
130 if [ "$hname" = "" ]; then
131 hname=unknown.host.domain
133 echo $hname > ${ETC}/myname
134 proto_domain=`echo $hname | sed -e 's/[^.]*\.//'`
137 echo "What DNS domain is this machine in (this is NOT its YP"
138 echo -n "domain name)? [$proto_domain] "
140 if [ "$dname" = "" ]; then
145 if [ -e $ETC/sendmail.cf ]; then
146 echo "WARNING: A default sendmail.cf exists, and probably"
147 echo "needs to be tuned and/or replaced, to work properly at"
150 echo "WARNING: No default sendmail.cf installed. Did you"
151 echo "forget to install the 'etc' distribution?"
154 echo "127.0.0.1 localhost localhost.$dname" > ${ETC}/hosts
157 echo -n "Configure network interfaces? [y] "
163 for if in `ifconfig -l`
172 echo -n "Making device nodes (may take a while)..."
179 if [ ! -f ${ROOT}/netbsd ]
181 echo "You have not unpacked the kernel installation"
182 echo "set. You must do so before you reboot."
186 # Upgrade cleanup utilities (functions), to make sure a recently-upgraded
187 # system is safely runnable. These are meant to be invoked from the shell
188 # prompt, by people installing NetBSD.
194 if [ ! -f /etc/fstab ]; then
198 echo "Cleaning up miscellaneous files in /etc..."
199 mv $upgrade_dir/etc/rc.bak $upgrade_dir/etc/rc
200 chroot $upgrade_dir /usr/sbin/pwd_mkdb -p /etc/master.passwd
201 chroot $upgrade_dir /bin/rm /etc/sendmail.fc > /dev/null 2>&1
206 echo "All that's left to do now is to install a new NetBSD kernel"
207 echo "on your hard disk. You should now halt your machine using"
208 echo "the 'halt' command. Once the machine is halted, replace the"
209 echo "installation floppy with the kernel-copy floppy and hit any"
210 echo "key to reboot. Use the kernel-copy floppy to copy a kernel"
211 echo "to your hard disk."