summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/config.c
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2002-04-06 02:39:27 +0000
committermurray <murray@FreeBSD.org>2002-04-06 02:39:27 +0000
commit8b9c90b040a008317cb30b07fcbd9fa4c4096abc (patch)
treec130b4790eaeb86347157828ee068f73f322ac88 /usr.sbin/sade/config.c
parent727934fcf811a2d9e3eb8f190cbf9d99f3395a1d (diff)
downloadFreeBSD-src-8b9c90b040a008317cb30b07fcbd9fa4c4096abc.zip
FreeBSD-src-8b9c90b040a008317cb30b07fcbd9fa4c4096abc.tar.gz
Teach sysinstall the difference between a command line, and an
executable file, so that we can pass commands with arguments to configXSetup().
Diffstat (limited to 'usr.sbin/sade/config.c')
-rw-r--r--usr.sbin/sade/config.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index 1f2d4fb..5f6d507 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -644,7 +644,7 @@ configXDesktop(dialogMenuItem *self)
int
configXSetup(dialogMenuItem *self)
{
- char *config, *execfile, *style;
+ char *config, *execfile, *execcmd, *style, *tmp;
char *moused;
WINDOW *w = savescr();
@@ -678,8 +678,12 @@ tryagain:
vsystem("ldconfig -aout /usr/lib/aout /usr/lib/compat/aout /usr/local/lib/aout /usr/X11R6/lib/aout");
vsystem("/sbin/ifconfig lo0 127.0.0.1");
- execfile = string_concat("/usr/X11R6/bin/", config);
+ execcmd = string_concat("/usr/X11R6/bin/", config);
+ execfile = strdup(execcmd);
+ if ((tmp = strchr(execfile, ' ')))
+ *tmp = '\0';
if (file_executable(execfile)) {
+ free(execfile);
moused = variable_get(VAR_MOUSED);
while (!moused || strcmp(moused, "YES")) {
if (msgYesNo("The X server may access the mouse in two ways: direct access\n"
@@ -697,7 +701,7 @@ tryagain:
"Choose \"/dev/sysmouse\" as the mouse port and \"SysMouse\" or\n"
"\"MouseSystems\" as the mouse protocol in the X configuration\n"
"utility.");
- systemExecute(execfile);
+ systemExecute(execcmd);
if (!file_readable("/etc/XF86Config")) {
if (!msgYesNo("The XFree86 configuration process seems to have\nfailed. Would you like to try again?"))
goto tryagain;
@@ -712,6 +716,7 @@ config_desktop:
return DITEM_SUCCESS;
}
else {
+ free(execfile);
msgConfirm("The XFree86 setup utility you chose does not appear to be installed!\n"
"Please install this before attempting to configure XFree86.");
restorescr(w);
OpenPOWER on IntegriCloud