Bug 22040

Summary: Make sysinstall refer to environment variable `releaseName'
Product: Base System Reporter: Matsumura Naoki <mat>
Component: miscAssignee: Murray Stokely <murray>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-RELEASE   
Hardware: Any   
OS: Any   

Description Matsumura Naoki 2000-10-17 08:10:01 UTC
I use FreeBSD 4.1-RELEASE. But, there is only
4.1.1-RELEASE on anonymous ftp server in our
intranet.

So, I want to force /stand/sysinstall to get
packages of 4.1.1-RELEASE. But, current sysinstall
doesn't refer environment variable to determine
release name.

Fix: I made patchs to refer sysinstall environment
variable `releaseName'.


% diff -u install.c.org install.c


% diff -u sysinstall.8.org sysinstall.8                                        --- sysinstall.8.org    Tue Oct 17 14:39:48 2000
+++ sysinstall.8        Tue Oct 17 15:33:11 2000
@@ -136,6 +136,8 @@
 .nf
 
 /stand/sysinstall _ftpPath=ftp://ziggy/pub/ mediaSetFTP configPackages
+/stand/sysinstall _ftpPath=ftp://ziggy/pub/ mediaSetFTP \\
+               releaseName=4.1-RELEASE configPackages
 
 .fi
 Would initialize
@@ -839,6 +841,10 @@
 full system installation has just been done.
 .El
 .El
+.It releaseName
+Configure release name, e.g. `4.1.1-RELEASE'.
+.Pp
+\fBVariables:\fR None
 .Sh FILES
 This utility may edit the contents of
 .Pa /etc/rc.conf ,--xcTK3gMbdxDwcvoF5zvH9jvrTEp2TL90BNjvkhcqB5O51606
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- install.c.org       Tue Oct 17 15:41:00 2000
+++ install.c   Tue Oct 17 15:41:10 2000
@@ -1021,7 +1021,12 @@
     char *cp;
 
     /* Set default startup options */
-    variable_set2(VAR_RELNAME,                 getRelname(), 0);
+    cp = getenv(VAR_RELNAME);
+    if (cp)
+      variable_set2(VAR_RELNAME,               cp, 0);
+    else
+      variable_set2(VAR_RELNAME,               getRelname(), 0);
+
     variable_set2(VAR_CPIO_VERBOSITY,          "high", 0);
     variable_set2(VAR_KGET,                    "YES", 0);
     variable_set2(VAR_TAPE_BLOCKSIZE,          DEFAULT_TAPE_BLOCKSIZE, 0);
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2000-10-22 19:51:05 UTC
Responsible Changed
From-To: freebsd-bugs->murray

Over to sysinstall maintainer.
Comment 2 Murray Stokely freebsd_committer freebsd_triage 2001-03-14 09:37:47 UTC
Responsible Changed
From-To: murray->jkh

Looks reasonable, do you want to commit this?
Comment 3 jkh freebsd_committer freebsd_triage 2001-08-31 01:26:09 UTC
Responsible Changed
From-To: jkh->eric

He volunteered, honest
Comment 4 Murray Stokely freebsd_committer freebsd_triage 2001-08-31 22:29:07 UTC
State Changed
From-To: open->closed

/stand/sysinstall releaseName=4.N-RELEASE configPackages 

works now. 



Comment 5 Murray Stokely freebsd_committer freebsd_triage 2001-08-31 22:29:07 UTC
Responsible Changed
From-To: eric->murray

no reason.[B[A