aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2023-10-16 22:13:31 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2023-10-19 20:42:35 +0000
commit929e4723c3f5e66dd98fe3f342c6ec393c8eb9a5 (patch)
tree4266e5d474411b165acb68a27b5ae809f653e505
parent84b71a48ea415e35aad3bbc8c20f137ed4d0dd79 (diff)
downloadsrc-929e4723c3f5e66dd98fe3f342c6ec393c8eb9a5.tar.gz
src-929e4723c3f5e66dd98fe3f342c6ec393c8eb9a5.zip
bsdinstall partedit: Apply changes from scripted installs
I got a check inverted in a previous cleanup commit and as a result partedit was only applying GEOM changes (and generating an /etc/fstab) if it got an error reading the current GEOM mesh. Instead, it needed to do those actions if it succeeded in reading the mesh. The lack of /etc/fstab meant that bsdinstall mount didn't mount anything in a scripted install. PR: 273723 Reported by: Andrey Fesenko <andrey@bsdnir.info> Reported by: Michal Nowak <mnowak@startmail.com> Reviewed by: cognet, brooks Fixes: 230990991965 bsdinstall: Handle errors from geom_gettree. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42236 (cherry picked from commit 5307bbcc038f878b4b3714f03a2c824a0caeba4f) (cherry picked from commit bfbb28f3b1b659805364eea580033b4b3afcc0eb) Approved by: re (gjb)
-rw-r--r--usr.sbin/bsdinstall/partedit/partedit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c
index 6579c22f6068..3c5f552a935c 100644
--- a/usr.sbin/bsdinstall/partedit/partedit.c
+++ b/usr.sbin/bsdinstall/partedit/partedit.c
@@ -215,7 +215,7 @@ main(int argc, const char **argv)
if (prompt == NULL) {
error = geom_gettree(&mesh);
- if (error != 0) {
+ if (error == 0) {
if (validate_setup()) {
error = apply_changes(&mesh);
} else {