Bug 14672 - make rc.local's building of /etc/issue smarter
Summary: make rc.local's building of /etc/issue smarter
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 6.2
Hardware: i386 Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Keywords: FutureFeature
Depends On: 23497
TreeView+ depends on / blocked
Reported: 2000-07-26 19:03 UTC by James Ralston
Modified: 2014-03-17 02:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-29 23:43:36 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for /etc/rc.d/rc.local (1.26 KB, patch)
2000-07-26 19:04 UTC, James Ralston
no flags Details | Diff
/etc/rc.d/init.d/issue patch for initscripts-5.00-01 (3.09 KB, patch)
2000-09-05 03:19 UTC, James Ralston
no flags Details | Diff

Description James Ralston 2000-07-26 19:03:12 UTC
Currently, when /etc/rc.d/rc.local runs, it completely stomps the contents
of the /etc/issue file.  The comments in rc.local state:

# This will overwrite /etc/issue at every boot.  So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.

This is a very inflexible way to deal with the /etc/issue file.  There's
also no convenient way to override what rc.local does (except by modifying
it directly), as it runs *after* all of the other init scripts.  I don't
want to have to edit rc.local directly, as then I have to worry about
integrating my changes with the next release of Red Hat.

Attached is a patch for /etc/rc.d/rc.local that will allow more
customization of the /etc/issue file.  If the file /etc/issue.fixed exists,
its contents will be used verbatim as the /etc/issue file.  If
/etc/issue.fixed does not exist, but /etc/issue.preamble exists, then
/etc/issue.preamble will be prepended to the /etc/issue that rc.local
normally creates.

Comment 1 James Ralston 2000-07-26 19:04:20 UTC
Created attachment 1572 [details]
patch for /etc/rc.d/rc.local

Comment 2 Bill Nottingham 2000-08-07 05:22:57 UTC
rc.local is %config(noreplace); any local changes
will *never* be overriden. Therefore, I don't see the
need for this as much.

Comment 3 James Ralston 2000-08-17 08:40:53 UTC
Please reconsider, or at least consider an alternative.

I didn't open this bug to complain that my changes to /etc/rc.d/rc.local would
be overridden; I opened this bug to complain that the only avenue I have for
customizing the login banner is by editing /etc/rc.d/rc.local in the first

The reason I am reluctant to edit /etc/rc.d/rc.local is because it comes with
Red Hat code already in it.  If I edit this file, then for every single upgrade
I perform from that point forward, I must check to make sure that Red Hat hasn't
stuffed more things into this file, because I'll miss any changes (due to the
fact that the file is %config(noreplace)) unless I specifically look for them.

In fact, the reason you gave for closing this bug (that any local changes will
*never* be overridden) I consider a bug, and not a feature.  If Red Hat changes
/etc/rc.d/rc.local, I'd *prefer* that my local changes are moved to
/etc/rc.d/rc.local.rpmorig, because breaking my local changes will make me
notice that Red Hat has made changes that I need to go integrate.

IMO, if /etc/rc.d/rc.local is supposed to be a location for "your own
initialization stuff" (as the comments say), then I think it is an error for Red
Hat's building of /etc/issue to be placed there in the first place.  Instead,
the building of /etc/issue should take place in a separate SysV-style startup
script (S99issue, probably, since S99local is a symlink to /etc/rc.d/rc.local),
and the /etc/rc.d/rc.local that the initscripts package provides should contain
comments only, without any actual code.

I will provide patches for initscripts to implement this behavior (S99issue), if
you will accept them.

Comment 4 Bill Nottingham 2000-08-17 14:38:08 UTC
rc.local is not going to have anything added to it in the
forseeable future, for the reasons you mention.

It might shrink at some point. Something like what you
mention will probably be implemented at some point. If
you'd like to attach a patch, we'll look at it.

Comment 5 James Ralston 2000-09-05 03:19:14 UTC
Created attachment 3238 [details]
/etc/rc.d/init.d/issue patch for initscripts-5.00-01

Comment 6 James Ralston 2000-09-05 03:21:43 UTC
Ok, I've attached a simple patch to demonstrate what I think is the best course
of action to take.  This moves the building of /etc/issue entirely into a
separate initscript, and leaves /etc/rc.d/rc.local with nothing in it but

Comment 7 Andrew Bartlett 2001-01-07 02:22:28 UTC
I like it, and I have done a similar thing for rc.sysinit in bug 23497.  All
this patch needs is a 'touch /var/lock/subsys/issue' to stop it running at
random runlevel changes.  A similar 'touch /var/lock/subsys/local' for bug 17279
could be done while your at it.

Comment 8 Bill Nottingham 2001-07-11 01:20:33 UTC
Changed in 6.01-1. /etc/issue isn't touched at all; it's a static file
in another package that users are free to customize.

Note You need to log in before you can comment on or make changes to this bug.