diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2015-12-23 17:51:09 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2015-12-23 17:51:09 +0000 |
commit | 0ea58bb7ac1fcabd0b1cfd1dabbefbbb7cedebe9 (patch) | |
tree | e787aded7d6c8a955ae5661d332aa54b16127bb0 | |
parent | acaaba3b425304dd39e59c75aa1d9d5687180d3e (diff) |
- spacing
- use brace expansion in for-loop
OK krw@
-rw-r--r-- | distrib/miniroot/upgrade.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/distrib/miniroot/upgrade.sh b/distrib/miniroot/upgrade.sh index dc8444e29ae..3c198684391 100644 --- a/distrib/miniroot/upgrade.sh +++ b/distrib/miniroot/upgrade.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: upgrade.sh,v 1.88 2015/12/06 09:30:27 rpe Exp $ +# $OpenBSD: upgrade.sh,v 1.89 2015/12/23 17:51:08 rpe Exp $ # $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback @@ -49,23 +49,22 @@ while :; do ask "Root filesystem?" $ROOTDEV resp=${resp##*/} [[ -b /dev/$resp ]] && break - echo "$resp is not a block device." done ROOTDEV=$resp echo -n "Checking root filesystem (fsck -fp /dev/$ROOTDEV)..." fsck -fp /dev/$ROOTDEV >/dev/null 2>&1 || { echo "FAILED."; exit; } -echo "OK." +echo "OK." echo -n "Mounting root filesystem (mount -o ro /dev/$ROOTDEV /mnt)..." mount -o ro /dev/$ROOTDEV /mnt || { echo "FAILED."; exit; } -echo "OK." +echo "OK." # The fstab, hosts and myname files are required. -for _f in fstab hosts myname; do - [[ -f /mnt/etc/$_f ]] || { echo "No /mnt/etc/$_f!"; exit; } - cp /mnt/etc/$_f /tmp/$_f +for _f in /mnt/etc/{fstab,hosts,myname}; do + [[ -f $_f ]] || { echo "No $_f!"; exit; } + cp $_f /tmp/${_f##*/} done hostname $(stripcom /tmp/myname) THESETS="$THESETS site$VERSION-$(hostname -s).tgz" |