#!/bin/sh
-# $OpenBSD: install.sh,v 1.4 1997/04/30 18:52:43 niklas Exp $
+# $OpenBSD: install.sh,v 1.5 1997/04/30 23:56:05 grr Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
echo "The following will be used for the root filesystem:"
echo " ${ROOTDISK}a /"
-echo "${ROOTDISK}a /" > ${FILESYSTEMS}
+echo "${ROOTDISK}a /" > ${FILESYSTEMS}
resp="X" # force at least one iteration
while [ "X$resp" != X"done" ]; do
echo -n "Mount point? "
getresp ""
_mount_point=$resp
- if [ "X${_mount_point}" = X"/" ]; then
- # Invalid response; no multiple roots
- _first_char="X"
- else
- _first_char=`firstchar ${_mount_point}`
+ _first_char=`firstchar ${_mount_point}`
+ if [ "X${_first_char}" != X"/" ]; then
+ echo "mount point must be an absolute path!"
fi
done
- echo "${_device_name} ${_mount_point}" >> ${FILESYSTEMS}
+ if [ "X${_mount_point}" = X"/" ]; then
+ echo "root mount point is already taken care of!"
+ else
+ echo "${_device_name} ${_mount_point}" >> ${FILESYSTEMS}
+ fi
resp="X" # force loop to repeat
;;
esac
*)
;;
esac
+echo ""
+echo "The next step *WILL* overwrite any existing data on:"
+(
+ while read _device_name _junk; do
+ echo ${_device_name}
+ done
+) < ${FILESYSTEMS}
+echo ""
+
+echo -n "Are you *SURE* that you're ready to proceed? [n] "
+getresp "n"
+case "$resp" in
+ y*|Y*)
+ ;;
+ *)
+ echo "ok, try again later..."
+ exit
+ ;;
+esac
# Loop though the file, place filesystems on each device.
echo "Creating filesystems..."
if [ -f /etc/myname ]; then
resp=`cat /etc/myname`
fi
- echo -n "Enter system hostname: [$resp] "
while [ "X${resp}" = X"" ]; do
+ echo -n "Enter system hostname: [$resp] "
getresp "$resp"
done
hostname $resp
echo $resp > /tmp/myname
- echo -n "Enter DNS domain name: "
resp="" # force at least one iteration
while [ "X${resp}" = X"" ]; do
- getresp ""
+ echo -n "Enter DNS domain name: [$FQDN]"
+ getresp "$FQDN"
done
FQDN=$resp
cat /tmp/hosts
echo ""
echo "You may want to edit the host table in the event that"
- echo "you need to mount an NFS server."
+ echo "you are doing an NFS installation or an FTP installation"
+ echo "without a name server and want to refer to the server by"
+ echo "name rather than by its numeric ip address."
echo -n "Would you like to edit the host table? [n] "
getresp "n"
case "$resp" in
#!/bin/sh
-# $OpenBSD: install.sub,v 1.6 1997/04/30 20:25:36 deraadt Exp $
+# $OpenBSD: install.sub,v 1.7 1997/04/30 23:56:06 grr Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
fi
fi
+# get a reponse with default[s]
getresp() {
- read resp
- if [ "X$resp" = "X" ]; then
- resp=$1
- fi
+ valid="false"
+ while [ "X$valid" = "Xfalse" ]; do
+ read resp
+ if [ "X$resp" = "X" ]; then
+ resp=$1
+ fi
+ if [ $# -gt 1 ]; then
+ for i in $@; do
+ if [ "X$resp" = "X$i" ]; then
+ valid="true"
+ fi
+ done
+ else
+ valid="true"
+ fi
+ if [ "X$valid" = "Xfalse" ]; then
+ echo "Try again: Enter one of [$@]"
+ fi
+ done
}
isin() {
local _interface_mask
local _interface_symname
local _interface_extra
+ local _hostname
_interface_name=$1
done
# Get symbolic name
+ _hostname=`hostname`
resp="" # force one iteration
while [ "X${resp}" = X"" ]; do
- echo -n "Symbolic (host) name? "
- getresp ""
+ echo -n "Symbolic (host) name? [$_hostname] "
+ getresp "$_hostname"
_interface_symname=$resp
done
echo "quit" >> /tmp/ftp-script.sh
echo "__end_commands" >> /tmp/ftp-script.sh
+ cat << \__install_ftp_3
+
+Fetching the files via ftp may take a long time, especially over a slow
+network connection. You may want to review/edit the fetch script to make
+sure that you haven't made any errors in the file names.
+__install_ftp_3
+ echo -n "edit ftp fetch script? [n] "
+ getresp "n"
+ case "$resp" in
+ y*|Y*)
+ $EDITOR /tmp/ftp-script.sh
+ ;;
+ *)
+ ;;
+ esac
+
+
sh /tmp/ftp-script.sh
rm -f /tmp/ftp-script.sh
echo "Extraction complete."
Here is an example of what the partition information will look like once
you have entered the disklabel editor. Disk partition sizes and offsets
-are in sector (most likely 512 bytes) units. Make sure these size/offset
-pairs are on cylinder boundaries (the number of sector per cylinder is
-given in the `sectors/cylinder' entry, which is not shown here).
+are in sector (most likely 512 bytes) units.
+
+Make sure these size/offset pairs are on cylinder boundaries (the number
+of sector per cylinder is given in the `sectors/cylinder' entry.
+
+If this disk is previously un-labeled, only the "c" partition will show up
+in the editor and you will have to enter lines similar to those shown in the
+example for the other paritions. If you are uncertain about the syntax or
+space requirements, this is a good time to review the installation notes.
Do not change any parameters except the partition layout and the label name.
It's probably also wisest not to touch the `16 partitions:' line, even
in case you have defined less than sixteen partitions.
-[Example]
+[** EXAMPLE **]
+disk: p4200s
+bytes/sector: 512
+sectors/track: 40
+tracks/cylinder: 8
+sectors/cylinder: 320
+cylinders: 1280
+total sectors: 409600
+
16 partitions:
# size offset fstype [fsize bsize cpg]
- a: 50176 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 111)
- b: 64512 50176 swap # (Cyl. 112 - 255)
- c: 640192 0 unknown # (Cyl. 0 - 1428)
- d: 525504 114688 4.2BSD 1024 8192 16 # (Cyl. 256 - 1428)
-[End of example]
+ a: 51200 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 159)
+ b: 51200 51200 swap # (Cyl. 160 - 319)
+ c: 409600 0 unused 0 0 # (Cyl. 0 - 1279)
+ d: 307200 102400 4.2BSD 1024 8192 16 # (Cyl. 320 - 1279)
+[End of **EXAMPLE**]
__md_prep_disklabel_1
echo -n "Press [Enter] to continue "
-# $OpenBSD: dot.profile,v 1.3 1997/04/30 18:56:02 niklas Exp $
+# $OpenBSD: dot.profile,v 1.4 1997/04/30 23:56:07 grr Exp $
# $NetBSD: dot.profile,v 1.1 1995/12/18 22:54:43 pk Exp $
#
# Copyright (c) 1995 Jason R. Thorpe
TERM=sun
export TERM
-if [ -e /usr/bin/vim ]; then
- EDITOR=vim
-else
- EDITOR=ed
-fi
-export EDITOR
-
umask 022
if [ "X${DONEPROFILE}" = "X" ]; then
echo 'erase ^H, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
- # run update, so that installed software is written as it goes.
- update
-
# get the terminal type
_forceloop=""
while [ "X${_forceloop}" = X"" ]; do
_forceloop="done"
fi
done
+ export TERM
+
+ # get the editor preference
+ EDITOR=vi
+ _forceloop=""
+ while [ "X${_forceloop}" = X"" ]; do
+ echo -n "text editor - vi or ed? [$EDITOR] "
+ read _forceloop
+ case "$_forceloop" in
+ vi|"")
+ EDITOR=vi
+ _forceloop=$EDITOR
+ ;;
+
+ ed)
+ EDITOR=ed
+ ;;
+
+ *)
+ echo "sorry, no $_forceloop available"
+ _forceloop=""
+ ;;
+ esac
+ done
+ export EDITOR
# Installing or upgrading?
_forceloop=""