summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-05-03 05:13:39 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-05-03 05:13:39 +0000
commit97c0d43cba7be73e662f1ae0732a7edd3d921249 (patch)
tree56235727cb40383286472c22d912f72f63175de8
parent214f9558c301b8c588d5d2fc21fb3768cf31c550 (diff)
Simplify things by putting extra swap partitions in the fstab as
they are discovered rather than keeping a list and appending it to the end of the fstab. No impact unless you configure extra swap partitions. ok deraadt@
-rw-r--r--distrib/miniroot/install.sh18
1 files changed, 5 insertions, 13 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index c13c5f91678..e488da6e93b 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sh,v 1.177 2009/04/30 01:03:19 deraadt Exp $
+# $OpenBSD: install.sh,v 1.178 2009/05/03 05:13:38 krw Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@@ -60,9 +60,6 @@
# The name of the file holding the list of configured filesystems.
FILESYSTEMS=/tmp/filesystems
-# The name of the file holding the list of non-default configured swap devices.
-SWAPLIST=/tmp/swaplist
-
# install.sub needs to know the MODE
MODE=install
@@ -85,7 +82,6 @@ if [ ! -f /etc/fstab ]; then
# Make sure empty files exist so we don't have to
# keep checking for their existence before grep'ing.
cat /dev/null >$FILESYSTEMS
- cat /dev/null >$SWAPLIST
else
# Force the user to think and type in a disk name by
# making 'done' the default choice.
@@ -114,8 +110,10 @@ if [ ! -f /etc/fstab ]; then
if [[ $_pp == $ROOTDEV ]]; then
echo "$ROOTDEV /" >$FILESYSTEMS
continue
- elif [[ $_pp == $SWAPDEV || $_type == swap ]]; then
- echo "$_pp" >>$SWAPLIST
+ elif [[ $_pp == $SWAPDEV ]]; then
+ continue
+ elif [[ $_type == swap ]]; then
+ echo "/dev/$_pp none swap sw 0 0" >>/tmp/fstab
continue
elif [[ $_type != *BSD ]]; then
continue
@@ -298,12 +296,6 @@ __EOT
done
done >>/tmp/fstab
- # Append all non-default swap devices to fstab.
- while read _dev; do
- [[ $_dev == $SWAPDEV ]] || \
- echo "/dev/$_dev none swap sw 0 0" >>/tmp/fstab
- done <$SWAPLIST
-
munge_fstab
fi