Date: Sun, 23 Jul 2000 01:36:57 -0500 (CDT) From: Tim Zingelman <zingelman@fnal.gov> To: freebsd-stable@FreeBSD.ORG Subject: sysinstall resetting USA_RESIDENT=NO Message-ID: <Pine.GSO.4.21.0007230128540.26706-100000@nova.fnal.gov>
next in thread | raw e-mail | index | archive | help
Anytime sysinstall is run (after initial installation), it resets USA_RESIDENT=NO in /etc/make.conf as it starts up. Simply starting it and immediately exiting will cause this change to /etc/make.conf. Below are a set of patches to only reset USA_RESIDENT, if we have passed through the code that asks "are you really a USA resident", and otherwise leaves it alone. It could easily ask the question right there at initialization, if that is the preferred way to do it. This is my first real patch submission... is it prefered to submit a PR, or is sending to the list ok? Thanks, - Tim Index: config.c =================================================================== RCS file: /usr/CVS/src/release/sysinstall/config.c,v retrieving revision 1.156.2.3 diff -c -r1.156.2.3 config.c *** config.c 2000/07/16 17:29:58 1.156.2.3 --- config.c 2000/07/23 06:22:52 *************** *** 372,377 **** --- 372,378 ---- int i, nlines; FILE *fp; + if (!USAResValid) return; if (!file_readable(config)) { char *line = malloc(21); sprintf(line, "USA_RESIDENT=%s\n", USAResident ? "YES" : "NO"); Index: dist.c =================================================================== RCS file: /usr/CVS/src/release/sysinstall/dist.c,v retrieving revision 1.175.2.2 diff -c -r1.175.2.2 dist.c *** dist.c 2000/07/20 01:53:39 1.175.2.2 --- dist.c 2000/07/23 06:21:01 *************** *** 405,410 **** --- 405,411 ---- dialog_clear_norefresh(); USAResident = !msgYesNo("Are you actually resident in the United States?"); + USAResValid = TRUE; distVerifyFlags(); return i | DITEM_REDRAW | DITEM_RESTORE; Index: globals.c =================================================================== RCS file: /usr/CVS/src/release/sysinstall/globals.c,v retrieving revision 1.24 diff -c -r1.24 globals.c *** globals.c 2000/03/12 03:57:25 1.24 --- globals.c 2000/07/23 06:20:24 *************** *** 48,53 **** --- 48,54 ---- Boolean ColorDisplay; /* Are we on a color display? */ Boolean OnVTY; /* Are we on a VTY? */ Boolean USAResident; /* Are we cryptographically challenged? */ + Boolean USAResValid; /* Have we asked yet? */ Variable *VarHead; /* The head of the variable chain */ Device *mediaDevice; /* Where we're installing from */ int BootMgr; /* Which boot manager we're using */ *************** *** 70,73 **** --- 71,75 ---- mediaDevice = NULL; RunningAsInit = FALSE; USAResident = FALSE; + USAResValid = FALSE; } Index: sysinstall.h =================================================================== RCS file: /usr/CVS/src/release/sysinstall/sysinstall.h,v retrieving revision 1.186.2.6 diff -c -r1.186.2.6 sysinstall.h *** sysinstall.h 2000/07/21 20:43:48 1.186.2.6 --- sysinstall.h 2000/07/23 06:24:46 *************** *** 347,352 **** --- 347,353 ---- extern Boolean ColorDisplay; /* Are we on a color display? */ extern Boolean OnVTY; /* On a syscons VTY? */ Boolean USAResident; /* Are we cryptographically challenged? */ + Boolean USAResValid; /* Have we asked yet? */ extern Variable *VarHead; /* The head of the variable chain */ extern Device *mediaDevice; /* Where we're getting our distribution from */ extern unsigned int Dists; /* Which distributions we want */ ##### To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0007230128540.26706-100000>