diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-24 20:20:12 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-24 20:20:12 +0000 |
commit | 6f28cb7164ba72482c691734692f75f0e731bcd4 (patch) | |
tree | ebb7a5dfcc273292a5244deb00ae66000451c317 /release | |
parent | 221f419b42a2a2a89943198d51215b15c819a456 (diff) | |
download | FreeBSD-src-6f28cb7164ba72482c691734692f75f0e731bcd4.zip FreeBSD-src-6f28cb7164ba72482c691734692f75f0e731bcd4.tar.gz |
Allow both types of XFree86 setup script to be run at user choice.
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/config.c | 14 | ||||
-rw-r--r-- | release/sysinstall/menus.c | 19 | ||||
-rw-r--r-- | release/sysinstall/sysinstall.h | 2 |
3 files changed, 33 insertions, 2 deletions
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 3554285..84139dc 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -398,16 +398,26 @@ configUsers(dialogMenuItem *self) int configXFree86(dialogMenuItem *self) { - if (file_executable("/usr/X11R6/bin/XF86Setup")) { + char *config, *execfile; + + dialog_clear_norefresh(); + dmenuOpenSimple(&MenuXF86Config, FALSE); + + config = variable_get(VAR_XF86_CONFIG); + if (!config) + return DITEM_FAILURE | DITEM_RESTORE; + execfile = string_concat("/usr/X11R6/bin/", config); + if (file_executable(execfile)) { dialog_clear_norefresh(); if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) dmenuOpenSimple(&MenuMouse, FALSE); dialog_clear(); systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); - systemExecute("/usr/X11R6/bin/XF86Setup"); + systemExecute(execfile); return DITEM_SUCCESS | DITEM_RESTORE; } else { + dialog_clear_norefresh(); msgConfirm("XFree86 does not appear to be installed! Please install\n" "The XFree86 distribution before attempting to configure it."); return DITEM_FAILURE; diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index 8c28473..8ad1637 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -378,6 +378,25 @@ DMenu MenuMouse = { { NULL } }, }; +DMenu MenuXF86Config = { + DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, + "Please select the XFree86 configuration tool you want to use.", + "The first tool, XF86Setup, is fully graphical and requires the\n" + "VGA16 server in order to work (should have been selected by\n" + "default, but if you de-selected it then you won't be able to\n" + "use this fancy setup tool). The second tool, xf86config, is\n" + "a more simplistic shell-script based tool and less friendly to\n" + "new users, but it may work in situations where the fancier one\n" + "does not.", + "Press F1 to read the XFree86 release notes for FreeBSD", + "XF86", + { { "XF86Setup", "Use the fully graphical XFree86 configuration tool.", + NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF86Setup" }, + { "xf86config", "Use the shell-script based XFree86 configuration tool.", + NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" }, + { NULL } }, +}; + DMenu MenuMediaCDROM = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a CDROM type", diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 60bd8bd..1704887 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -145,6 +145,7 @@ #define VAR_UFS_PATH "ufs" #define VAR_USR_SIZE "usrSize" #define VAR_VAR_SIZE "varSize" +#define VAR_XF86_CONFIG "xf86config" #define DEFAULT_TAPE_BLOCKSIZE "20" @@ -366,6 +367,7 @@ extern DMenu MenuDiskDevices; /* Disk devices menu */ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */ extern DMenu MenuUsermgmt; /* User management menu */ extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */ +extern DMenu MenuXF86Config; /* Select XFree86 configuration type */ /* Stuff from libdialog which isn't properly declared outside */ extern void display_helpfile(void); |