Bug 14672 - make rc.local's building of /etc/issue smarter
make rc.local's building of /etc/issue smarter
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
: FutureFeature
Depends On: 23497
Blocks:
  Show dependency treegraph
 
Reported: 2000-07-26 15:03 EDT by James Ralston
Modified: 2014-03-16 22:15 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-29 18:43:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 15:04 EDT, James Ralston
no flags Details | Diff
/etc/rc.d/init.d/issue patch for initscripts-5.00-01 (3.09 KB, patch)
2000-09-04 23:19 EDT, James Ralston
no flags Details | Diff

  None (edit)
Description James Ralston 2000-07-26 15:03:12 EDT
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 15:04:20 EDT
Created attachment 1572 [details]
patch for /etc/rc.d/rc.local
Comment 2 Bill Nottingham 2000-08-07 01:22:57 EDT
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 04:40:53 EDT
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
place.

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 10:38:08 EDT
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-04 23:19:14 EDT
Created attachment 3238 [details]
/etc/rc.d/init.d/issue patch for initscripts-5.00-01
Comment 6 James Ralston 2000-09-04 23:21:43 EDT
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
comments.
Comment 7 Andrew Bartlett 2001-01-06 21:22:28 EST
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-10 21:20:33 EDT
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.