diff options
author | Murray Stokely <murray@FreeBSD.org> | 2002-04-06 02:39:27 +0000 |
---|---|---|
committer | Murray Stokely <murray@FreeBSD.org> | 2002-04-06 02:39:27 +0000 |
commit | 7e25871d198bcf9aca105ae73c78aef49479ddb1 (patch) | |
tree | c130b4790eaeb86347157828ee068f73f322ac88 /usr.sbin | |
parent | f7adda6c7ba123739d23578748ac633ff1e75e0f (diff) | |
download | src-7e25871d198bcf9aca105ae73c78aef49479ddb1.tar.gz src-7e25871d198bcf9aca105ae73c78aef49479ddb1.zip |
Teach sysinstall the difference between a command line, and an
executable file, so that we can pass commands with arguments to
configXSetup().
Notes
Notes:
svn path=/head/; revision=93918
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/config.c | 11 | ||||
-rw-r--r-- | usr.sbin/sysinstall/config.c | 11 |
2 files changed, 16 insertions, 6 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index 1f2d4fbd50fb..5f6d50728b5a 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); diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 1f2d4fbd50fb..5f6d50728b5a 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/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); |