diff options
-rw-r--r-- | release/sysinstall/install.c | 28 | ||||
-rw-r--r-- | release/sysinstall/menus.c | 8 | ||||
-rw-r--r-- | release/sysinstall/register.c | 4 | ||||
-rw-r--r-- | release/sysinstall/sysinstall.h | 8 | ||||
-rw-r--r-- | release/sysinstall/version.h | 1 | ||||
-rw-r--r-- | usr.sbin/sade/install.c | 28 | ||||
-rw-r--r-- | usr.sbin/sade/menus.c | 8 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 8 | ||||
-rw-r--r-- | usr.sbin/sysinstall/install.c | 28 | ||||
-rw-r--r-- | usr.sbin/sysinstall/menus.c | 8 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 8 |
11 files changed, 80 insertions, 57 deletions
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index a9f1f62..c98b1b7 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.217 1998/10/23 10:27:50 jkh Exp $ + * $Id: install.c,v 1.218 1998/11/15 09:06:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -49,6 +49,7 @@ #include <msdosfs/msdosfsmount.h> #undef MSDOSFS #include <sys/stat.h> +#include <sys/sysctl.h> #include <unistd.h> static void create_termcap(void); @@ -748,8 +749,7 @@ installFixupBin(dialogMenuItem *self) } #ifdef SAVE_USERCONFIG /* Snapshot any boot -c changes back to the new kernel */ - if (!variable_cmp(VAR_RELNAME, RELEASE_NAME)) - save_userconfig_to_kernel("/kernel"); + save_userconfig_to_kernel("/kernel"); #endif } else { @@ -1002,6 +1002,20 @@ installFilesystems(dialogMenuItem *self) return DITEM_SUCCESS; } +static char * +getRelname(void) +{ + static char buf[64]; + int sz = (sizeof buf) - 1; + + if (sysctlbyname("kern.osrelease", buf, &sz, NULL, 0) != -1) { + buf[sz] = '\0'; + return buf; + } + else + return "<unknown>"; +} + /* Initialize various user-settable values to their defaults */ int installVarDefaults(dialogMenuItem *self) @@ -1009,7 +1023,7 @@ installVarDefaults(dialogMenuItem *self) char *cp; /* Set default startup options */ - variable_set2(VAR_RELNAME, RELEASE_NAME); + variable_set2(VAR_RELNAME, getRelname()); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); variable_set2(VAR_INSTALL_ROOT, "/"); @@ -1019,13 +1033,13 @@ installVarDefaults(dialogMenuItem *self) cp = "/usr/bin/ee"; variable_set2(VAR_EDITOR, cp); variable_set2(VAR_FTP_USER, "ftp"); - variable_set2(VAR_BROWSER_PACKAGE, PACKAGE_LYNX); + variable_set2(VAR_BROWSER_PACKAGE, "lynx"); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); variable_set2(VAR_FTP_STATE, "passive"); variable_set2(VAR_NFS_SECURE, "YES"); variable_set2(VAR_PKG_TMPDIR, "/usr/tmp"); - variable_set2(VAR_GATED_PKG, PACKAGE_GATED); - variable_set2(VAR_PCNFSD_PKG, PACKAGE_PCNFSD); + variable_set2(VAR_GATED_PKG, "gated"); + variable_set2(VAR_PCNFSD_PKG, "pcnfsd"); variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT)); if (getpid() != 1) variable_set2(SYSTEM_STATE, "update"); diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index 1431e4c..f0ef87a 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.171 1998/09/30 21:39:02 jkh Exp $ + * $Id: menus.c,v 1.172 1998/11/03 03:38:55 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -290,8 +290,8 @@ DMenu MenuIndex = { /* The initial installation menu */ DMenu MenuInitial = { DMENU_NORMAL_TYPE, - "Welcome to FreeBSD! [" RELEASE_NAME "]", /* title */ - "This is the main menu of the FreeBSD installation system. Please\n" /* prompt */ + "/stand/sysinstall Main Menu", /* title */ + "Welcome to the FreeBSD installation and configuration tool. Please\n" /* prompt */ "select one of the options below by using the arrow keys or typing the\n" "first character of the option name you're interested in. Invoke an\n" "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.", @@ -317,7 +317,7 @@ DMenu MenuInitial = { /* The main documentation menu */ DMenu MenuDocumentation = { DMENU_NORMAL_TYPE, - "Documentation for FreeBSD " RELEASE_NAME, + "FreeBSD Documentation Menu", "If you are at all unsure about the configuration of your hardware\n" "or are looking to build a system specifically for FreeBSD, read the\n" "Hardware guide! New users should also read the Install document for\n" diff --git a/release/sysinstall/register.c b/release/sysinstall/register.c index b520071..c3e3bf1 100644 --- a/release/sysinstall/register.c +++ b/release/sysinstall/register.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: register.c,v 1.7 1997/05/26 04:57:56 jkh Exp $ + * $Id: register.c,v 1.8 1997/08/18 21:47:34 jkh Exp $ * * Copyright (c) 1997 * Jordan Hubbard. All rights reserved. @@ -175,7 +175,7 @@ handle_registration(void) hotspots[COMMERCE_EMAIL].sel ? "yes" : "no", hotspots[COMMERCE_MAIL].sel ? "yes" : "no", hotspots[ANNOUNCE_LIST].sel ? "yes" : "no", hotspots[NEWSLETTER].sel == 0 ? "no" : hotspots[NEWSLETTER].sel == 1 ? "postal" : "email"); - fprintf(fp, "<version>%s</version>\n", RELEASE_NAME); + fprintf(fp, "<version>%s</version>\n", variable_get(VAR_RELNAME)); fprintf(fp, "</entry>\n"); fclose(fp); dialog_clear_norefresh(); diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 0024b73..80833d0 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.149 1998/10/14 11:23:48 jkh Exp $ + * $Id: sysinstall.h,v 1.150 1998/11/15 09:06:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -51,15 +51,9 @@ #include "colors.h" #include "libdisk.h" #include "dist.h" -#include "version.h" /*** Defines ***/ -/* Different packages we depend on - update symlinks when versions change! */ -#define PACKAGE_GATED "gated" -#define PACKAGE_PCNFSD "pcnfsd" -#define PACKAGE_LYNX "lynx" - /* device limits */ #define DEV_NAME_MAX 64 /* The maximum length of a device name */ #define DEV_MAX 100 /* The maximum number of devices we'll deal with */ diff --git a/release/sysinstall/version.h b/release/sysinstall/version.h deleted file mode 100644 index b42c26e..0000000 --- a/release/sysinstall/version.h +++ /dev/null @@ -1 +0,0 @@ -#define RELEASE_NAME "__RELEASE" diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index a9f1f62..c98b1b7 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.217 1998/10/23 10:27:50 jkh Exp $ + * $Id: install.c,v 1.218 1998/11/15 09:06:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -49,6 +49,7 @@ #include <msdosfs/msdosfsmount.h> #undef MSDOSFS #include <sys/stat.h> +#include <sys/sysctl.h> #include <unistd.h> static void create_termcap(void); @@ -748,8 +749,7 @@ installFixupBin(dialogMenuItem *self) } #ifdef SAVE_USERCONFIG /* Snapshot any boot -c changes back to the new kernel */ - if (!variable_cmp(VAR_RELNAME, RELEASE_NAME)) - save_userconfig_to_kernel("/kernel"); + save_userconfig_to_kernel("/kernel"); #endif } else { @@ -1002,6 +1002,20 @@ installFilesystems(dialogMenuItem *self) return DITEM_SUCCESS; } +static char * +getRelname(void) +{ + static char buf[64]; + int sz = (sizeof buf) - 1; + + if (sysctlbyname("kern.osrelease", buf, &sz, NULL, 0) != -1) { + buf[sz] = '\0'; + return buf; + } + else + return "<unknown>"; +} + /* Initialize various user-settable values to their defaults */ int installVarDefaults(dialogMenuItem *self) @@ -1009,7 +1023,7 @@ installVarDefaults(dialogMenuItem *self) char *cp; /* Set default startup options */ - variable_set2(VAR_RELNAME, RELEASE_NAME); + variable_set2(VAR_RELNAME, getRelname()); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); variable_set2(VAR_INSTALL_ROOT, "/"); @@ -1019,13 +1033,13 @@ installVarDefaults(dialogMenuItem *self) cp = "/usr/bin/ee"; variable_set2(VAR_EDITOR, cp); variable_set2(VAR_FTP_USER, "ftp"); - variable_set2(VAR_BROWSER_PACKAGE, PACKAGE_LYNX); + variable_set2(VAR_BROWSER_PACKAGE, "lynx"); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); variable_set2(VAR_FTP_STATE, "passive"); variable_set2(VAR_NFS_SECURE, "YES"); variable_set2(VAR_PKG_TMPDIR, "/usr/tmp"); - variable_set2(VAR_GATED_PKG, PACKAGE_GATED); - variable_set2(VAR_PCNFSD_PKG, PACKAGE_PCNFSD); + variable_set2(VAR_GATED_PKG, "gated"); + variable_set2(VAR_PCNFSD_PKG, "pcnfsd"); variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT)); if (getpid() != 1) variable_set2(SYSTEM_STATE, "update"); diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c index 1431e4c..f0ef87a 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.171 1998/09/30 21:39:02 jkh Exp $ + * $Id: menus.c,v 1.172 1998/11/03 03:38:55 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -290,8 +290,8 @@ DMenu MenuIndex = { /* The initial installation menu */ DMenu MenuInitial = { DMENU_NORMAL_TYPE, - "Welcome to FreeBSD! [" RELEASE_NAME "]", /* title */ - "This is the main menu of the FreeBSD installation system. Please\n" /* prompt */ + "/stand/sysinstall Main Menu", /* title */ + "Welcome to the FreeBSD installation and configuration tool. Please\n" /* prompt */ "select one of the options below by using the arrow keys or typing the\n" "first character of the option name you're interested in. Invoke an\n" "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.", @@ -317,7 +317,7 @@ DMenu MenuInitial = { /* The main documentation menu */ DMenu MenuDocumentation = { DMENU_NORMAL_TYPE, - "Documentation for FreeBSD " RELEASE_NAME, + "FreeBSD Documentation Menu", "If you are at all unsure about the configuration of your hardware\n" "or are looking to build a system specifically for FreeBSD, read the\n" "Hardware guide! New users should also read the Install document for\n" diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 0024b73..80833d0 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.149 1998/10/14 11:23:48 jkh Exp $ + * $Id: sysinstall.h,v 1.150 1998/11/15 09:06:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -51,15 +51,9 @@ #include "colors.h" #include "libdisk.h" #include "dist.h" -#include "version.h" /*** Defines ***/ -/* Different packages we depend on - update symlinks when versions change! */ -#define PACKAGE_GATED "gated" -#define PACKAGE_PCNFSD "pcnfsd" -#define PACKAGE_LYNX "lynx" - /* device limits */ #define DEV_NAME_MAX 64 /* The maximum length of a device name */ #define DEV_MAX 100 /* The maximum number of devices we'll deal with */ diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index a9f1f62..c98b1b7 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.217 1998/10/23 10:27:50 jkh Exp $ + * $Id: install.c,v 1.218 1998/11/15 09:06:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -49,6 +49,7 @@ #include <msdosfs/msdosfsmount.h> #undef MSDOSFS #include <sys/stat.h> +#include <sys/sysctl.h> #include <unistd.h> static void create_termcap(void); @@ -748,8 +749,7 @@ installFixupBin(dialogMenuItem *self) } #ifdef SAVE_USERCONFIG /* Snapshot any boot -c changes back to the new kernel */ - if (!variable_cmp(VAR_RELNAME, RELEASE_NAME)) - save_userconfig_to_kernel("/kernel"); + save_userconfig_to_kernel("/kernel"); #endif } else { @@ -1002,6 +1002,20 @@ installFilesystems(dialogMenuItem *self) return DITEM_SUCCESS; } +static char * +getRelname(void) +{ + static char buf[64]; + int sz = (sizeof buf) - 1; + + if (sysctlbyname("kern.osrelease", buf, &sz, NULL, 0) != -1) { + buf[sz] = '\0'; + return buf; + } + else + return "<unknown>"; +} + /* Initialize various user-settable values to their defaults */ int installVarDefaults(dialogMenuItem *self) @@ -1009,7 +1023,7 @@ installVarDefaults(dialogMenuItem *self) char *cp; /* Set default startup options */ - variable_set2(VAR_RELNAME, RELEASE_NAME); + variable_set2(VAR_RELNAME, getRelname()); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); variable_set2(VAR_INSTALL_ROOT, "/"); @@ -1019,13 +1033,13 @@ installVarDefaults(dialogMenuItem *self) cp = "/usr/bin/ee"; variable_set2(VAR_EDITOR, cp); variable_set2(VAR_FTP_USER, "ftp"); - variable_set2(VAR_BROWSER_PACKAGE, PACKAGE_LYNX); + variable_set2(VAR_BROWSER_PACKAGE, "lynx"); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); variable_set2(VAR_FTP_STATE, "passive"); variable_set2(VAR_NFS_SECURE, "YES"); variable_set2(VAR_PKG_TMPDIR, "/usr/tmp"); - variable_set2(VAR_GATED_PKG, PACKAGE_GATED); - variable_set2(VAR_PCNFSD_PKG, PACKAGE_PCNFSD); + variable_set2(VAR_GATED_PKG, "gated"); + variable_set2(VAR_PCNFSD_PKG, "pcnfsd"); variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT)); if (getpid() != 1) variable_set2(SYSTEM_STATE, "update"); diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index 1431e4c..f0ef87a 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.171 1998/09/30 21:39:02 jkh Exp $ + * $Id: menus.c,v 1.172 1998/11/03 03:38:55 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -290,8 +290,8 @@ DMenu MenuIndex = { /* The initial installation menu */ DMenu MenuInitial = { DMENU_NORMAL_TYPE, - "Welcome to FreeBSD! [" RELEASE_NAME "]", /* title */ - "This is the main menu of the FreeBSD installation system. Please\n" /* prompt */ + "/stand/sysinstall Main Menu", /* title */ + "Welcome to the FreeBSD installation and configuration tool. Please\n" /* prompt */ "select one of the options below by using the arrow keys or typing the\n" "first character of the option name you're interested in. Invoke an\n" "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.", @@ -317,7 +317,7 @@ DMenu MenuInitial = { /* The main documentation menu */ DMenu MenuDocumentation = { DMENU_NORMAL_TYPE, - "Documentation for FreeBSD " RELEASE_NAME, + "FreeBSD Documentation Menu", "If you are at all unsure about the configuration of your hardware\n" "or are looking to build a system specifically for FreeBSD, read the\n" "Hardware guide! New users should also read the Install document for\n" diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 0024b73..80833d0 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.149 1998/10/14 11:23:48 jkh Exp $ + * $Id: sysinstall.h,v 1.150 1998/11/15 09:06:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -51,15 +51,9 @@ #include "colors.h" #include "libdisk.h" #include "dist.h" -#include "version.h" /*** Defines ***/ -/* Different packages we depend on - update symlinks when versions change! */ -#define PACKAGE_GATED "gated" -#define PACKAGE_PCNFSD "pcnfsd" -#define PACKAGE_LYNX "lynx" - /* device limits */ #define DEV_NAME_MAX 64 /* The maximum length of a device name */ #define DEV_MAX 100 /* The maximum number of devices we'll deal with */ |