From 2618634bae4484c48e08f125ba8c1e8f7b6c6865 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Tue, 6 Jul 1999 08:45:40 +0000 Subject: [PATCH] Add an option for more fully enabling linux compatibility. --- release/sysinstall/config.c | 15 ++++++++++++++- release/sysinstall/install.c | 12 ++++++++---- release/sysinstall/menus.c | 6 ++++-- release/sysinstall/package.c | 4 ++-- release/sysinstall/sysinstall.h | 4 +++- usr.sbin/sade/config.c | 15 ++++++++++++++- usr.sbin/sade/install.c | 12 ++++++++---- usr.sbin/sade/menus.c | 6 ++++-- usr.sbin/sade/sade.h | 4 +++- usr.sbin/sysinstall/config.c | 15 ++++++++++++++- usr.sbin/sysinstall/install.c | 12 ++++++++---- usr.sbin/sysinstall/menus.c | 6 ++++-- usr.sbin/sysinstall/package.c | 4 ++-- usr.sbin/sysinstall/sysinstall.h | 4 +++- 14 files changed, 91 insertions(+), 28 deletions(-) diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 6a23e4d73b2c..3551d61e4957 100644 --- a/release/sysinstall/config.c +++ b/release/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.135 1999/05/15 15:05:08 jkh Exp $ + * $Id: config.c,v 1.136 1999/05/18 00:44:27 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -448,6 +448,14 @@ configUsers(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_RESTORE; } +int +configLinux(dialogMenuItem *self) +{ + variable_set2(VAR_LINUX_ENABLE, "YES", 1); + msgNotify("Installing Linux compatibility library..."); + return package_add("linux_lib"); +} + static void write_root_xprofile(char *str) { @@ -522,6 +530,11 @@ configXDesktop(dialogMenuItem *self) if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("enlightenment")) write_root_xprofile("xterm &\nexec enlightenment\n"); } + else if (!strcmp(desk, "fvwm")) { + ret = package_add("fvwm"); + if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("fvwm")) + write_root_xprofile("xterm &\nexec 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" diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index 9e9745938b1e..b1bbaa019eb2 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.237 1999/05/27 10:32:47 jkh Exp $ + * $Id: install.c,v 1.238 1999/06/17 19:04:53 markm Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -573,6 +573,10 @@ nodisks: restorescr(w); } + dialog_clear_norefresh(); + if (!msgYesNo("Would you like to enable Linux binary compatibility?")) + (void)configLinux(self); + dialog_clear_norefresh(); if (!msgYesNo("Does this system have a mouse attached to it?")) { WINDOW *w = savescr(); @@ -588,21 +592,21 @@ nodisks: if (directory_exists("/usr/X11R6")) { dialog_clear_norefresh(); if (!msgYesNo("Would you like to configure your X server at this time?")) - configXSetup(self); + (void)configXSetup(self); } dialog_clear_norefresh(); if (!msgYesNo("The FreeBSD package collection is a collection of hundreds of ready-to-run\n" "applications, from text editors to games to WEB servers and more. Would you\n" "like to browse the collection now?")) - configPackages(self); + (void)configPackages(self); dialog_clear_norefresh(); if (!msgYesNo("Would you like to add any initial user accounts to the system?\n" "Adding at least one account for yourself at this stage is suggested\n" "since working as the \"root\" user is dangerous (it is easy to do\n" "things which adversely affect the entire system).")) - configUsers(self); + (void)configUsers(self); dialog_clear_norefresh(); msgConfirm("Now you must set the system manager's password.\n" diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index f98a3d596655..37cc699c24f8 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.207 1999/06/09 09:18:33 jkh Exp $ + * $Id: menus.c,v 1.208 1999/06/23 03:52:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -470,6 +470,8 @@ DMenu MenuXDesktops = { NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" }, { "Enlightenment","The E Window manager (24 bit recommended)", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" }, + { "fvwm", "The fvwm Window manager", + NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm" }, { NULL } }, }; @@ -1237,7 +1239,7 @@ DMenu MenuStartup = { { "lpd", "This host has a printer and wants to run lpd.", dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" }, { "linux", "This host wants to be able to run linux binaries.", - dmenuVarCheck, dmenuToggleVariable, NULL, "linux_enable=YES" }, + dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" }, { "quotas", "This host wishes to check quotas on startup.", dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" }, { "SCO", "This host wants to be able to run IBCS2 binaries.", diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c index 4c311ae93745..36543ed482bb 100644 --- a/release/sysinstall/package.c +++ b/release/sysinstall/package.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: package.c,v 1.77 1999/05/27 10:32:49 jkh Exp $ + * $Id: package.c,v 1.78 1999/07/02 22:36:12 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -68,7 +68,7 @@ package_add(char *name) if (DITEM_STATUS(i) != DITEM_SUCCESS) return i; - tmp3 = strpbrk(name, "-_") ? NULL : &tmp2; + tmp3 = strpbrk(name, "-") ? NULL : &tmp2; tmp = index_search(&Top, name, tmp3); if (tmp) return index_extract(mediaDevice, &Top, tmp, FALSE); diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 4816712530aa..c9075866df98 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: sysinstall.h,v 1.166 1999/05/27 10:32:50 jkh Exp $ + * $Id: sysinstall.h,v 1.167 1999/07/02 22:36:14 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -122,6 +122,7 @@ #define VAR_KGET "kget" #define VAR_LABEL "label" #define VAR_LABEL_COUNT "labelCount" +#define VAR_LINUX_ENABLE "linux_enable" #define VAR_MEDIA_TYPE "mediaType" #define VAR_MEDIA_TIMEOUT "MEDIA_TIMEOUT" #define VAR_MOUSED "moused_enable" @@ -415,6 +416,7 @@ extern int configResolv(dialogMenuItem *self); extern int configPackages(dialogMenuItem *self); extern int configSaver(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); +extern int configLinux(dialogMenuItem *self); extern int configNTP(dialogMenuItem *self); extern int configUsers(dialogMenuItem *self); extern int configXSetup(dialogMenuItem *self); diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index 6a23e4d73b2c..3551d61e4957 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.135 1999/05/15 15:05:08 jkh Exp $ + * $Id: config.c,v 1.136 1999/05/18 00:44:27 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -448,6 +448,14 @@ configUsers(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_RESTORE; } +int +configLinux(dialogMenuItem *self) +{ + variable_set2(VAR_LINUX_ENABLE, "YES", 1); + msgNotify("Installing Linux compatibility library..."); + return package_add("linux_lib"); +} + static void write_root_xprofile(char *str) { @@ -522,6 +530,11 @@ configXDesktop(dialogMenuItem *self) if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("enlightenment")) write_root_xprofile("xterm &\nexec enlightenment\n"); } + else if (!strcmp(desk, "fvwm")) { + ret = package_add("fvwm"); + if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("fvwm")) + write_root_xprofile("xterm &\nexec 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" diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 9e9745938b1e..b1bbaa019eb2 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.237 1999/05/27 10:32:47 jkh Exp $ + * $Id: install.c,v 1.238 1999/06/17 19:04:53 markm Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -573,6 +573,10 @@ nodisks: restorescr(w); } + dialog_clear_norefresh(); + if (!msgYesNo("Would you like to enable Linux binary compatibility?")) + (void)configLinux(self); + dialog_clear_norefresh(); if (!msgYesNo("Does this system have a mouse attached to it?")) { WINDOW *w = savescr(); @@ -588,21 +592,21 @@ nodisks: if (directory_exists("/usr/X11R6")) { dialog_clear_norefresh(); if (!msgYesNo("Would you like to configure your X server at this time?")) - configXSetup(self); + (void)configXSetup(self); } dialog_clear_norefresh(); if (!msgYesNo("The FreeBSD package collection is a collection of hundreds of ready-to-run\n" "applications, from text editors to games to WEB servers and more. Would you\n" "like to browse the collection now?")) - configPackages(self); + (void)configPackages(self); dialog_clear_norefresh(); if (!msgYesNo("Would you like to add any initial user accounts to the system?\n" "Adding at least one account for yourself at this stage is suggested\n" "since working as the \"root\" user is dangerous (it is easy to do\n" "things which adversely affect the entire system).")) - configUsers(self); + (void)configUsers(self); dialog_clear_norefresh(); msgConfirm("Now you must set the system manager's password.\n" diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c index f98a3d596655..37cc699c24f8 100644 --- a/usr.sbin/sade/menus.c +++ b/usr.sbin/sade/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.207 1999/06/09 09:18:33 jkh Exp $ + * $Id: menus.c,v 1.208 1999/06/23 03:52:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -470,6 +470,8 @@ DMenu MenuXDesktops = { NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" }, { "Enlightenment","The E Window manager (24 bit recommended)", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" }, + { "fvwm", "The fvwm Window manager", + NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm" }, { NULL } }, }; @@ -1237,7 +1239,7 @@ DMenu MenuStartup = { { "lpd", "This host has a printer and wants to run lpd.", dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" }, { "linux", "This host wants to be able to run linux binaries.", - dmenuVarCheck, dmenuToggleVariable, NULL, "linux_enable=YES" }, + dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" }, { "quotas", "This host wishes to check quotas on startup.", dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" }, { "SCO", "This host wants to be able to run IBCS2 binaries.", diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 4816712530aa..c9075866df98 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.h @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: sysinstall.h,v 1.166 1999/05/27 10:32:50 jkh Exp $ + * $Id: sysinstall.h,v 1.167 1999/07/02 22:36:14 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -122,6 +122,7 @@ #define VAR_KGET "kget" #define VAR_LABEL "label" #define VAR_LABEL_COUNT "labelCount" +#define VAR_LINUX_ENABLE "linux_enable" #define VAR_MEDIA_TYPE "mediaType" #define VAR_MEDIA_TIMEOUT "MEDIA_TIMEOUT" #define VAR_MOUSED "moused_enable" @@ -415,6 +416,7 @@ extern int configResolv(dialogMenuItem *self); extern int configPackages(dialogMenuItem *self); extern int configSaver(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); +extern int configLinux(dialogMenuItem *self); extern int configNTP(dialogMenuItem *self); extern int configUsers(dialogMenuItem *self); extern int configXSetup(dialogMenuItem *self); diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 6a23e4d73b2c..3551d61e4957 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.135 1999/05/15 15:05:08 jkh Exp $ + * $Id: config.c,v 1.136 1999/05/18 00:44:27 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -448,6 +448,14 @@ configUsers(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_RESTORE; } +int +configLinux(dialogMenuItem *self) +{ + variable_set2(VAR_LINUX_ENABLE, "YES", 1); + msgNotify("Installing Linux compatibility library..."); + return package_add("linux_lib"); +} + static void write_root_xprofile(char *str) { @@ -522,6 +530,11 @@ configXDesktop(dialogMenuItem *self) if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("enlightenment")) write_root_xprofile("xterm &\nexec enlightenment\n"); } + else if (!strcmp(desk, "fvwm")) { + ret = package_add("fvwm"); + if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("fvwm")) + write_root_xprofile("xterm &\nexec 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" diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 9e9745938b1e..b1bbaa019eb2 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.237 1999/05/27 10:32:47 jkh Exp $ + * $Id: install.c,v 1.238 1999/06/17 19:04:53 markm Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -573,6 +573,10 @@ nodisks: restorescr(w); } + dialog_clear_norefresh(); + if (!msgYesNo("Would you like to enable Linux binary compatibility?")) + (void)configLinux(self); + dialog_clear_norefresh(); if (!msgYesNo("Does this system have a mouse attached to it?")) { WINDOW *w = savescr(); @@ -588,21 +592,21 @@ nodisks: if (directory_exists("/usr/X11R6")) { dialog_clear_norefresh(); if (!msgYesNo("Would you like to configure your X server at this time?")) - configXSetup(self); + (void)configXSetup(self); } dialog_clear_norefresh(); if (!msgYesNo("The FreeBSD package collection is a collection of hundreds of ready-to-run\n" "applications, from text editors to games to WEB servers and more. Would you\n" "like to browse the collection now?")) - configPackages(self); + (void)configPackages(self); dialog_clear_norefresh(); if (!msgYesNo("Would you like to add any initial user accounts to the system?\n" "Adding at least one account for yourself at this stage is suggested\n" "since working as the \"root\" user is dangerous (it is easy to do\n" "things which adversely affect the entire system).")) - configUsers(self); + (void)configUsers(self); dialog_clear_norefresh(); msgConfirm("Now you must set the system manager's password.\n" diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index f98a3d596655..37cc699c24f8 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.207 1999/06/09 09:18:33 jkh Exp $ + * $Id: menus.c,v 1.208 1999/06/23 03:52:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -470,6 +470,8 @@ DMenu MenuXDesktops = { NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" }, { "Enlightenment","The E Window manager (24 bit recommended)", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" }, + { "fvwm", "The fvwm Window manager", + NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm" }, { NULL } }, }; @@ -1237,7 +1239,7 @@ DMenu MenuStartup = { { "lpd", "This host has a printer and wants to run lpd.", dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" }, { "linux", "This host wants to be able to run linux binaries.", - dmenuVarCheck, dmenuToggleVariable, NULL, "linux_enable=YES" }, + dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" }, { "quotas", "This host wishes to check quotas on startup.", dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" }, { "SCO", "This host wants to be able to run IBCS2 binaries.", diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c index 4c311ae93745..36543ed482bb 100644 --- a/usr.sbin/sysinstall/package.c +++ b/usr.sbin/sysinstall/package.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: package.c,v 1.77 1999/05/27 10:32:49 jkh Exp $ + * $Id: package.c,v 1.78 1999/07/02 22:36:12 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -68,7 +68,7 @@ package_add(char *name) if (DITEM_STATUS(i) != DITEM_SUCCESS) return i; - tmp3 = strpbrk(name, "-_") ? NULL : &tmp2; + tmp3 = strpbrk(name, "-") ? NULL : &tmp2; tmp = index_search(&Top, name, tmp3); if (tmp) return index_extract(mediaDevice, &Top, tmp, FALSE); diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 4816712530aa..c9075866df98 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: sysinstall.h,v 1.166 1999/05/27 10:32:50 jkh Exp $ + * $Id: sysinstall.h,v 1.167 1999/07/02 22:36:14 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -122,6 +122,7 @@ #define VAR_KGET "kget" #define VAR_LABEL "label" #define VAR_LABEL_COUNT "labelCount" +#define VAR_LINUX_ENABLE "linux_enable" #define VAR_MEDIA_TYPE "mediaType" #define VAR_MEDIA_TIMEOUT "MEDIA_TIMEOUT" #define VAR_MOUSED "moused_enable" @@ -415,6 +416,7 @@ extern int configResolv(dialogMenuItem *self); extern int configPackages(dialogMenuItem *self); extern int configSaver(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); +extern int configLinux(dialogMenuItem *self); extern int configNTP(dialogMenuItem *self); extern int configUsers(dialogMenuItem *self); extern int configXSetup(dialogMenuItem *self);