diff options
author | jkh <jkh@FreeBSD.org> | 1999-04-28 06:39:25 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-04-28 06:39:25 +0000 |
commit | 522c1b88d0c194a241b2607c0cdaba016aeb3b47 (patch) | |
tree | fe0a43dd7928516c27156bcaba88c89d035c9cdb /usr.sbin | |
parent | f7508f90bb955c8f96f74f315e169b683434d7a7 (diff) | |
download | FreeBSD-src-522c1b88d0c194a241b2607c0cdaba016aeb3b47.zip FreeBSD-src-522c1b88d0c194a241b2607c0cdaba016aeb3b47.tar.gz |
Do the right thing for windowmaker installation if it's picked. Add some
seat belts for failed desktop installations.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/config.c | 24 | ||||
-rw-r--r-- | usr.sbin/sysinstall/config.c | 24 |
2 files changed, 34 insertions, 14 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index c3f396c..ec8e497 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.125 1999/04/24 01:53:53 jkh Exp $ + * $Id: config.c,v 1.126 1999/04/27 14:33:23 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -470,7 +470,7 @@ int configXDesktop(dialogMenuItem *self) { char *desk; - int ret; + int ret = DITEM_SUCCESS; if (!dmenuOpenSimple(&MenuXDesktops, FALSE) || !(desk = variable_get(VAR_DESKSTYLE))) @@ -482,8 +482,11 @@ configXDesktop(dialogMenuItem *self) } else if (!strcmp(desk, "gnome")) { ret = package_add("@gnomecore"); - if (DITEM_STATUS(ret) != DITEM_FAILURE) - write_root_xprofile("exec gnome-session\n"); + if (DITEM_STATUS(ret) != DITEM_FAILURE) { + ret = package_add("@afterstep"); + if (DITEM_STATUS(ret) != DITEM_FAILURE) + write_root_xprofile("gnome-session &\nexec afterstep"); + } } else if (!strcmp(desk, "afterstep")) { ret = package_add("@afterstep"); @@ -492,17 +495,24 @@ configXDesktop(dialogMenuItem *self) } else if (!strcmp(desk, "windowmaker")) { ret = package_add("@windowmaker"); - if (DITEM_STATUS(ret) != DITEM_FAILURE) - write_root_xprofile("xterm &\nexec windowmaker\n"); + if (DITEM_STATUS(ret) != DITEM_FAILURE) { + vsystem("/usr/X11R6/bin/wmaker.inst"); + write_root_xprofile("xterm &\nexec wmaker\n"); + } } else if (!strcmp(desk, "enlightenment")) { ret = package_add("@enlightenment"); if (DITEM_STATUS(ret) != DITEM_FAILURE) write_root_xprofile("xterm &\nexec enlightenment\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."); return ret; } - + int configXSetup(dialogMenuItem *self) { diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index c3f396c..ec8e497 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.125 1999/04/24 01:53:53 jkh Exp $ + * $Id: config.c,v 1.126 1999/04/27 14:33:23 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -470,7 +470,7 @@ int configXDesktop(dialogMenuItem *self) { char *desk; - int ret; + int ret = DITEM_SUCCESS; if (!dmenuOpenSimple(&MenuXDesktops, FALSE) || !(desk = variable_get(VAR_DESKSTYLE))) @@ -482,8 +482,11 @@ configXDesktop(dialogMenuItem *self) } else if (!strcmp(desk, "gnome")) { ret = package_add("@gnomecore"); - if (DITEM_STATUS(ret) != DITEM_FAILURE) - write_root_xprofile("exec gnome-session\n"); + if (DITEM_STATUS(ret) != DITEM_FAILURE) { + ret = package_add("@afterstep"); + if (DITEM_STATUS(ret) != DITEM_FAILURE) + write_root_xprofile("gnome-session &\nexec afterstep"); + } } else if (!strcmp(desk, "afterstep")) { ret = package_add("@afterstep"); @@ -492,17 +495,24 @@ configXDesktop(dialogMenuItem *self) } else if (!strcmp(desk, "windowmaker")) { ret = package_add("@windowmaker"); - if (DITEM_STATUS(ret) != DITEM_FAILURE) - write_root_xprofile("xterm &\nexec windowmaker\n"); + if (DITEM_STATUS(ret) != DITEM_FAILURE) { + vsystem("/usr/X11R6/bin/wmaker.inst"); + write_root_xprofile("xterm &\nexec wmaker\n"); + } } else if (!strcmp(desk, "enlightenment")) { ret = package_add("@enlightenment"); if (DITEM_STATUS(ret) != DITEM_FAILURE) write_root_xprofile("xterm &\nexec enlightenment\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."); return ret; } - + int configXSetup(dialogMenuItem *self) { |