Bug 166484 - [rc] [patch] rc.initdiskless patch for different major versions living together
Summary: [rc] [patch] rc.initdiskless patch for different major versions living together
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-03-29 10:10 UTC by nagy.attila
Modified: 2022-10-17 12:39 UTC (History)
0 users

See Also:


Attachments
file.diff (2.92 KB, patch)
2012-03-29 10:10 UTC, nagy.attila
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nagy.attila 2012-03-29 10:10:08 UTC
In /etc/rc.initdiskless (used for NFS based diskless booting) it is possible to use different template directories, currently base -used mainly for storing the FreeBSD standard /etc base-, default -which is used for all netbooted machines, overriding what is in base-, broadcast and IP address based overrides.
This scheme works well for a small amount of machines running the same major FreeBSD version, but when there are different major versions running concurrently, the same base /etc starts to cause problems.
In our application we use FreeBSD 7, 8 and 9 versions, and to make things work somehow, we have to pick one /etc (main concerns are the rc scripts in rc* and rc.d/*) from a given major version which works for all major versions.
But due to incompatibilities, this is a no go, so we started to use different base templates for the given major release.
The attached patch is the fix for this problem, it makes possible to use base as today, and base.${major_release} (preferred over base if exists) for the major release.
With this patch we can run any FreeBSD major releases together from the same NFS servers without any problems and hacks due to differing rc.d and rc script versions and needs.

Fix: Multiple -major release based- base templates.

Patch attached with submission follows:
How-To-Repeat: Use different FreeBSD major releases with the same /etc.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-03-29 20:07:22 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 2 Chris Rees 2012-11-04 12:21:22 UTC
I think this is a great idea.

My only concern is the backslashitis in the finding of $rel, and also
the fact that it won't catch 10 properly :)

Instead of:

rel=`expr \`uname -r\` : '\(.\)'`

try:

rel=$(expr `uname -r` : '\([0-9][0-9]*\)')

Does anyone else have any opinions?

Chris
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:48 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:39:39 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>