From 8b9c90b040a008317cb30b07fcbd9fa4c4096abc Mon Sep 17 00:00:00 2001 From: murray Date: Sat, 6 Apr 2002 02:39:27 +0000 Subject: Teach sysinstall the difference between a command line, and an executable file, so that we can pass commands with arguments to configXSetup(). --- usr.sbin/sade/config.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'usr.sbin/sade/config.c') 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); -- cgit v1.1