summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrpe <rpe@openbsd.org>2014-01-07 23:58:44 +0000
committerrpe <rpe@openbsd.org>2014-01-07 23:58:44 +0000
commit93e05fc1f2faa7f4b82e24eac58e03db1caceacc (patch)
treec4a95542261d814af99063b1ada95373ac5b9c8c
parentAsa Yeamans points out that we need to CMSG_SPACE[] for the 2nd message (diff)
downloadwireguard-openbsd-93e05fc1f2faa7f4b82e24eac58e03db1caceacc.tar.xz
wireguard-openbsd-93e05fc1f2faa7f4b82e24eac58e03db1caceacc.zip
Make skipping the root fs DUID aware.
If ROOTDEV is either the device from fstab or the converted DUID device name with the partition added, skip the current fstab entry ok halex@
-rw-r--r--distrib/miniroot/install.sub9
1 files changed, 5 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 0e2e8c3b11a..93e55eb31a8 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.724 2014/01/05 01:52:17 deraadt Exp $
+# $OpenBSD: install.sub,v 1.725 2014/01/07 23:58:44 rpe Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@@ -1769,16 +1769,17 @@ getdevname() {
#
# Exit if any fsck's fail (but do them all before exiting!).
check_fs() {
- local _dev _mp _fstype _rest _fail _f _passno
+ local _dev _dn _mp _fstype _rest _fail _f _passno
ask_yn "Force checking of clean non-root filesystems?"
[[ $resp == y ]] && _f=f
while read _dev _mp _fstype _rest _rest _passno _rest; do
- [ "$_dev" != /dev/"$ROOTDEV" ] || continue
+ _dn=$(getdevname "$_dev")
+ [[ $ROOTDEV == @(${_dev#/dev/}|$_dn${_dev##*.}) ]] && continue
[ -f "/sbin/fsck_$_fstype" ] || continue
# Make sure device exists before fsck'ing it.
- makedev "$(getdevname "$_dev")" || continue
+ makedev "$_dn" || continue
((_passno > 0)) || continue
echo -n "fsck -${_f}p $_dev..."
if ! fsck -${_f}p $_dev >/dev/null 2>&1; then