Bug 194325 - missing support of a .d directory for execution of scriptlets in last boot step
Summary: missing support of a .d directory for execution of scriptlets in last boot step
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 8
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard: bzcl34nup
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-07 11:16 UTC by Peter Bieringer
Modified: 2014-03-17 03:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-26 15:44:52 UTC
Type: ---


Attachments (Terms of Use)

Description Peter Bieringer 2006-06-07 11:16:49 UTC
This is a request for enhancement:

Currently, if I distribute some post-boot scripts, I have to change
/etc/rc.d/rc.local each time.

I would e.g. do this by distributing rpm packages, so it would be a good idea to
have similar mechanism like introduced in Linux vixie-cron (/etc/cron.d).

I have no 100% idea how to implement this proper, 

one would be to extend rc.local, another would be to extend rc itself or create
a rc.local.d somewhere and add proper support.

BTW: here some examples of common used post-boot scripts which are currently
stored in rc.local on our systems:

# Set VESA timeout on console
echo -en "\033[14;10]" >/dev/console

# Send notify about reboot
echo -e "System $HOSTNAME booted on `date`\n\nKernel: `uname -a`\n\nLast
logins:\n`last -30`" | mail -s "System $HOSTNAME booted on `date`"
hostmaster

# Workaround for buggy RHEL if serial console is active (Bugzilla #150769)
. /etc/sysconfig/keyboard
loadkeys $KEYTABLE.map </dev/tty0 >/dev/tty0

Each can be a scriptlet and stored in a directory and waiting to be executed by
rc or rc.local or whatelse before finishing boot.

Comment 1 Bill Nottingham 2006-06-07 14:38:16 UTC
What prevents these from being 'normal' /etc/rcX.d/S** scripts?

Comment 2 Peter Bieringer 2006-06-07 14:52:23 UTC
One line of functional shell code results in around 50 lines of script code, and
one chkconfig call ... overkill.

Perhaps a simple
  if [ ! -f /var/lock/subsys/scriptlets.d ]; then
     run-parts /etc/rc.d/scriptlets.d
     touch /var/lock/subsys/scriptlets.d
  fi
would be fullfil my feature requests (can test this next days and provide a patch).

Comment 3 Peter Bieringer 2007-07-30 09:52:24 UTC
Switched version to "devel" to get more publicity for this RFE.

Note that in productive environment this would be a good extension, think about
a company's "adjustment" RPM package, which contains some local cron entries
(stored in /etc/cron.d/) and some post startup scripts, which can be pushed into
/etc/rc.local.d (if available in the future).

Comment 4 Bug Zapper 2008-04-03 17:21:05 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 5 Peter Bieringer 2008-04-04 10:01:24 UTC
Issue still exists, don't know whether the new init framework supports such
extension.

Comment 6 Bug Zapper 2008-11-26 06:58:49 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bill Nottingham 2008-11-26 15:44:52 UTC
upstart should be able to handle this fine ; see the /etc/event.d/tty scripts for an example.


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