1 # $NetBSD: dot.instutils,v 1.8 2000/06/14 17:24:06 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 utilites (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.
44 echo "You will now be prompted for information about this"
45 echo "machine. If you hit return, the default answer (in"
46 echo "brackets) will be used."
49 echo -n "What is this machine's hostname? [unknown.host.domain] "
51 if [ "$hname" = "" ]; then
52 hname=unknown.host.domain
54 echo $hname > ${ETC}/myname
55 proto_domain=`echo $hname | sed -e 's/[^.]*\.//'`
58 echo "What domain is this machine in (this is NOT its YP"
59 echo -n "domain name)? [$proto_domain] "
61 if [ "$dname" = "" ]; then
66 if [ -e /mnt/etc/sendmail.cf ]; then
67 echo "WARNING: A default sendmail.cf exists, and probably"
68 echo "needs to be tuned and/or replaced, to work properly at"
71 echo "WARNING: No default sendmail.cf installed. Did you"
72 echo "forget to install the 'etc' distribution?"
75 echo "127.0.0.1 localhost localhost.$dname" > ${ETC}/hosts
78 echo -n "Does this machine have an ethernet interface? [y] "
85 while [ "$intf" = "" ]; do
86 echo -n "What is the primary interface name "
87 echo -n "(e.g. ae0, ed0, le0, or es0)? "
90 echo -n "What is the hostname for this interface? [$hname] "
92 if [ "$ifname" = "" ]; then
96 while [ "$ifaddr" = "" ]; do
97 echo -n "What is the IP address associated with "
98 echo -n "interface ${intf}? "
101 echo "$ifaddr $ifname `echo $ifname | sed -e s/\.$dname//`" \
104 echo -n "Does this interface have a special netmask? [n] "
108 echo -n "What is the netmask? [0xffffff00] "
110 if [ "$ifnetmask" = "" ]; then
119 echo -n "Does this interface need additional flags? [n] "
123 echo -n "What flags? [link0] "
125 if [ "$ifflags" = "" ]; then
133 echo "inet $ifname $ifnetmask $ifflags" > ${ETC}/hostname.$intf
136 echo -n "WARNING: if you have any more ethernet interfaces, "
137 echo "you will have to configure"
138 echo -n "them by hand. Read the comments in /etc/rc.d/network "
139 echo "to learn how to do this."
144 echo -n "Making device nodes (may take a while)..."
150 echo -n "Copying the kernel..."
151 cp /netbsd /mnt/netbsd
153 echo -n "Installing boot block..."
154 read rdev rest < /mnt/etc/fstab
155 /mnt/usr/mdec/installboot /mnt/usr/mdec/xxboot `echo $rdev | sed -e 's^/dev/^/dev/r^'`
161 echo "You should now halt your machine using the 'halt' command."
162 echo "Once the machine is halted, reboot it."