From 5438e358caa741b1933377bc0cdd35b83e12ef5b Mon Sep 17 00:00:00 2001 From: rpokala Date: Fri, 23 Feb 2018 16:46:49 +0000 Subject: [PATCH] MFC r323508: When doing a non-interactive installation, don't display an interactive warning about a filesystem which doesn't have a mountpoint. Presumably, the person who wrote the install script knew what they were doing. git-svn-id: svn://svn.freebsd.org/base/stable/10@329870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/bsdinstall/partedit/gpart_ops.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index 624077d79..cefb27fe3 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -1034,14 +1034,17 @@ addpartform: /* Warn if no mountpoint set */ if (strcmp(items[0].text, "freebsd-ufs") == 0 && items[2].text[0] != '/') { - dialog_vars.defaultno = TRUE; - choice = dialog_yesno("Warning", - "This partition does not have a valid mountpoint " - "(for the partition from which you intend to boot the " - "operating system, the mountpoint should be /). Are you " - "sure you want to continue?" - , 0, 0); - dialog_vars.defaultno = FALSE; + choice = 0; + if (interactive) { + dialog_vars.defaultno = TRUE; + choice = dialog_yesno("Warning", + "This partition does not have a valid mountpoint " + "(for the partition from which you intend to boot the " + "operating system, the mountpoint should be /). Are you " + "sure you want to continue?" + , 0, 0); + dialog_vars.defaultno = FALSE; + } if (choice == 1) /* cancel */ goto addpartform; } -- 2.42.0