Two of the umount -f are not neccessary, and only risk leaving
authorderaadt <deraadt@openbsd.org>
Tue, 7 Dec 2021 04:13:22 +0000 (04:13 +0000)
committerderaadt <deraadt@openbsd.org>
Tue, 7 Dec 2021 04:13:22 +0000 (04:13 +0000)
filesystems in bad shape.  The other -f are special, and I haven't
though through them yet.
discussed with florian and tb a while back

distrib/miniroot/install.sub

index f686691..893432f 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/ksh
-#      $OpenBSD: install.sub,v 1.1185 2021/12/02 17:18:39 deraadt Exp $
+#      $OpenBSD: install.sub,v 1.1186 2021/12/07 04:13:22 deraadt Exp $
 #
 # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
 # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -2318,7 +2318,7 @@ is_rootdisk() {
                                ls -d /mnt/{bin,dev,etc,home,mnt,root,sbin,tmp,usr,var}
                        fi
                        _rc=$?
-                       umount -f /mnt
+                       umount /mnt
                fi
                rm -f /dev/{r,}$_d?
                return $_rc
@@ -3301,7 +3301,7 @@ check_unattendedupgrade() {
                                _rc=$?
                                ((_rc == 0)) && cp /mnt/auto_upgrade.conf /
                                echo "Which disk is the root disk = ${_d}" >> /auto_upgrade.conf
-                               umount -f /mnt
+                               umount /mnt
                        fi
                        rm -f /dev/{r,}$_d?
                fi