diff options
Diffstat (limited to 'usr.sbin/sade/install.c')
| -rw-r--r-- | usr.sbin/sade/install.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index a9f1f6251caf..c98b1b765986 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"); |
