summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/config.c
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2004-08-30 21:03:09 +0000
committerkensmith <kensmith@FreeBSD.org>2004-08-30 21:03:09 +0000
commit1062d781d5eec0e3f7ec6db1375e28cc5a04e71e (patch)
treefb04bfe4fbd2686ea2f2fddad898e7b53019183d /usr.sbin/sade/config.c
parent6c65caf0a24924dad7586ad39cb5071d1b51f34a (diff)
downloadFreeBSD-src-1062d781d5eec0e3f7ec6db1375e28cc5a04e71e.zip
FreeBSD-src-1062d781d5eec0e3f7ec6db1375e28cc5a04e71e.tar.gz
Remove support for configuring the X server from sysinstall. General
concensus seems to be that is best left for doing post-install. Discussed on: freebsd-current@ Tested with: make release Approved by: re@ MFC after: 3 days
Diffstat (limited to 'usr.sbin/sade/config.c')
-rw-r--r--usr.sbin/sade/config.c139
1 files changed, 0 insertions, 139 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index 4f3d882..acfde5b 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -635,145 +635,6 @@ gotit(char *fname)
}
int
-configXDesktop(dialogMenuItem *self)
-{
- char *desk;
- int ret = DITEM_SUCCESS;
- WINDOW *w = savescr();
-
- dialog_clear_norefresh();
- if (!dmenuOpenSimple(&MenuXDesktops, FALSE) || !(desk = variable_get(VAR_DESKSTYLE))) {
- restorescr(w);
- return DITEM_FAILURE;
- }
- if (!strcmp(desk, "kde")) {
- ret = package_add("kde-lite");
- if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("startkde"))
- write_root_xprofile("exec startkde\n");
- }
- else if (!strcmp(desk, "gnome2")) {
- ret = package_add("gnome2-lite");
- if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("gnome-session"))
- write_root_xprofile("exec gnome-session\n");
- }
- else if (!strcmp(desk, "afterstep")) {
- ret = package_add("afterstep");
- if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("afterstep"))
- write_root_xprofile("exec afterstep\n");
- }
- else if (!strcmp(desk, "windowmaker")) {
- ret = package_add("windowmaker");
- if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("wmaker.inst")) {
- write_root_xprofile("xterm &\n[ ! -d $HOME/GNUstep/Library/WindowMaker ] && /usr/X11R6/bin/wmaker.inst\nexec /usr/X11R6/bin/wmaker\n");
- }
- }
- else if (!strcmp(desk, "fvwm2")) {
- ret = package_add("fvwm");
- if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("fvwm"))
- write_root_xprofile("exec fvwm\n");
- }
- if (DITEM_STATUS(ret) == DITEM_FAILURE)
- msgConfirm("An error occurred while adding the package(s) required\n"
- "by this desktop type. Please change installation media\n"
- "and/or select a different, perhaps simpler, desktop\n"
- "environment and try again.");
- restorescr(w);
- return ret;
-}
-
-int
-configXSetup(dialogMenuItem *self)
-{
- char *config, *execfile, *execcmd, *style, *tmp;
-#ifdef WITH_MICE
- char *moused;
-#endif
- WINDOW *w = savescr();
-
- setenv("XWINHOME", "/usr/X11R6", 1);
-tryagain:
- variable_unset(VAR_DESKSTYLE);
- variable_unset(VAR_XORG_CONFIG);
- dialog_clear_norefresh();
- if (!dmenuOpenSimple(&MenuXOrgConfig, FALSE)) {
- restorescr(w);
- return DITEM_FAILURE;
- }
- config = variable_get(VAR_XORG_CONFIG);
- style = variable_get(VAR_DESKSTYLE);
- if (!config) {
- if (style)
- goto config_desktop;
- else {
- restorescr(w);
- return DITEM_FAILURE;
- }
- }
-
- if (file_readable("/var/run/ld-elf.so.hints"))
- vsystem("/sbin/ldconfig -m /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat");
- else
- vsystem("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat");
-
- vsystem("/sbin/ifconfig lo0 127.0.0.1");
-
- /*
- * execcmd may have been passed in as a command name with
- * arguments. Therefore, before determining if it is suitable for
- * execution, we must split off the filename component from the
- * command line arguments.
- */
-
- execcmd = string_concat("/usr/X11R6/bin/", config);
- execfile = strdup(execcmd);
- if ((tmp = strchr(execfile, ' ')))
- *tmp = '\0';
- if (file_executable(execfile)) {
- free(execfile);
-#ifdef WITH_MICE
- 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"
- "or indirect access via the mouse daemon. You have not\n"
- "configured the mouse daemon. Would you like to configure it\n"
- "now? If you intend to let the X server access the mouse\n"
- "directly, choose \"No\" at this time."))
- break;
- dialog_clear_norefresh();
- dmenuOpenSimple(&MenuMouse, FALSE);
- moused = variable_get(VAR_MOUSED);
- }
- if (moused && !strcmp(moused, "YES"))
- msgConfirm("You have configured and are now running the mouse daemon.\n"
- "Choose \"/dev/sysmouse\" as the mouse port and \"SysMouse\" or\n"
- "\"MouseSystems\" as the mouse protocol in the X configuration\n"
- "utility.");
-#endif
- Mkdir("/etc/X11"); /* XXX:Remove this later after we are happy mtree will have created this for us. */
- systemExecute(execcmd);
- if (!file_readable("/etc/X11/xorg.conf")) {
- if (!msgYesNo("The X.Org configuration process seems to have\nfailed. Would you like to try again?"))
- goto tryagain;
- else {
- restorescr(w);
- return DITEM_FAILURE;
- }
- }
-config_desktop:
- configXDesktop(self);
- restorescr(w);
- return DITEM_SUCCESS;
- }
- else {
- free(execfile);
- msgConfirm("The X.Org setup utility you chose does not appear to be installed!\n"
- "Please install this before attempting to configure X.Org.");
- restorescr(w);
- return DITEM_FAILURE;
- }
-}
-
-int
configResolv(dialogMenuItem *ditem)
{
FILE *fp;
OpenPOWER on IntegriCloud