summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2002-03-26 01:50:09 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2002-03-26 01:50:09 +0000
commitcd366ed967cb0b91847a6f7a223b48619dbd62ad (patch)
treedb219a6df914a31d7751d917436c46e54c691d52 /distrib/miniroot
parent8071fb360df466a85940c220e157f03ef6cac498 (diff)
Cleanup (and shrink) ftp_list_files() in install.sub by removing
some unneeded intermediate local variables and just using the parameters. Make upgrade fsck output for root partition consistant with later fsck output for other partitions. ok deraadt@
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sub11
-rw-r--r--distrib/miniroot/upgrade.sh18
2 files changed, 15 insertions, 14 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index aad23e0c865..9b8a5703156 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sub,v 1.188 2002/03/22 23:29:28 deraadt Exp $
+# $OpenBSD: install.sub,v 1.189 2002/03/26 01:50:08 krw Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -328,13 +328,10 @@ list_has_sets() {
ftp_list_files() {
# log in via ftp to host $1 as user $2 with password $3
# and return a list of all files in the directory $4 on stdout
- local _host=$1 _user="$2" _pass="$3" _dir=$4
- shift; shift; shift; shift
-
- ftp ${_ftp_active} -V -n $_host << __ptf
-user "$_user" "$_pass"
-cd $_dir
+ ftp ${_ftp_active} -V -n "$1" << __ptf
+user "$2" "$3"
+cd "$4"
ls
quit
__ptf
diff --git a/distrib/miniroot/upgrade.sh b/distrib/miniroot/upgrade.sh
index 37e0ef81f8a..6338729a39a 100644
--- a/distrib/miniroot/upgrade.sh
+++ b/distrib/miniroot/upgrade.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: upgrade.sh,v 1.22 2002/03/04 13:59:52 krw Exp $
+# $OpenBSD: upgrade.sh,v 1.23 2002/03/26 01:50:08 krw Exp $
# $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -102,19 +102,23 @@ while [ "X${resp}" = "X" ]; do
getresp "${ROOTDISK}a"
_root_filesystem="/dev/`basename $resp`"
if [ ! -b ${_root_filesystem} ]; then
- echo "Sorry, ${resp} is not a block device."
+ echo "Sorry, ${_root_filesystem} is not a block device."
resp=
fi
done
-echo "Checking root filesystem..."
-if ! fsck -pf ${_root_filesystem}; then
- echo "ERROR: can't check root filesystem!"
+echo -n "Checking root filesystem (fsck -fp ${_root_filesystem}) ... "
+if fsck -fp ${_root_filesystem} > /dev/null 2>&1; then
+ echo "OK."
+else
+ echo "FAILED.\nYou must fsck ${_root_filesystem} manually."
exit 1
fi
-echo "Mounting root filesystem..."
-if ! mount -o ro ${_root_filesystem} /mnt; then
+echo -n "Mounting root filesystem ... "
+if mount -o ro ${_root_filesystem} /mnt; then
+ echo "Done."
+else
echo "ERROR: can't mount root filesystem!"
exit 1
fi