summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sh
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2002-12-04 03:39:08 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2002-12-04 03:39:08 +0000
commite95061789bd91c251cf246741eeb4343474d8343 (patch)
tree4e87912c88dc5003b337e902bd849ae7758274a9 /distrib/miniroot/install.sh
parentb67e179fcdd38132b62cfdf63e78d2118bee61fa (diff)
Code cleanup & shrinkage.
Redo configure_ifs() to take full advantage of recent code refactoring, and cleanup code while there. Move address or dhcp question to after media option handling so that each question gives immediate feedback. i.e. if the media options given don't work then say so and exit, and if dhcp is requested immediately issue the dhcp request. Also allows some code shrinkage. Eliminate addifconfig() and remount(). The former is folded into configure_ifs() and the latter's three lines simply replace the call in install.sh. Move remount code to before any configuration files are moved to the installed system.
Diffstat (limited to 'distrib/miniroot/install.sh')
-rw-r--r--distrib/miniroot/install.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index 69d5da57b82..dd3c43a0dc5 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sh,v 1.125 2002/12/03 00:58:35 krw Exp $
+# $OpenBSD: install.sh,v 1.126 2002/12/04 03:39:07 krw Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -354,11 +354,18 @@ IFS=$_oifs
install_sets
+# Remount all filesystems in /etc/fstab with the options from
+# /etc/fstab, i.e. without any options such as async which
+# may have been used in the first mount.
+while read _dev _mp _fstype _opt _rest; do
+ mount -u -o $_opt $_dev $_mp || exit
+done < /etc/fstab
+
# Set machdep.apertureallowed if required. install_sets must be
# done first so that /etc/sysctl.conf is available.
set_machdep_apertureallowed
-# Copy configuration files to /mnt/etc.
+# Move configuration files to /mnt/etc.
cfgfiles="fstab hostname.* dhclient.conf resolv.conf resolv.conf.tail kbdtype sysctl.conf"
echo -n "Saving configuration files..."
@@ -386,8 +393,6 @@ for file in $cfgfiles; do
done
echo "...done."
-remount_fs
-
_encr=`/mnt/usr/bin/encrypt -b 8 -- "$_password"`
echo "1,s@^root::@root:${_encr}:@
w