Bug 105372 - RFE: Add /etc/inittab.d/ for improved modularity
Summary: RFE: Add /etc/inittab.d/ for improved modularity
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: SysVinit
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL: ftp://67.83.203.127/pub/sysvinit/sysv...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-09-25 14:48 UTC by Bill Rugolsky, Jr.
Modified: 2014-03-17 02:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-01-28 06:28:31 UTC
Embargoed:


Attachments (Terms of Use)
Add support for /etc/inittab.d/ (3.05 KB, patch)
2003-09-25 14:55 UTC, Bill Rugolsky, Jr.
no flags Details | Diff
Add missing continue statement to stat() error path (3.08 KB, patch)
2003-09-25 15:16 UTC, Bill Rugolsky, Jr.
no flags Details | Diff

Description Bill Rugolsky, Jr. 2003-09-25 14:48:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

Description of problem:
The attached patch adds support to SysVinit for optionally splitting all or part
of /etc/inittab into files in /etc/inittab.d.  It accomplishes for supervised
services what /etc/init.d/ provides for unsupervised services. I have submitted
it upstream to Miquel van Smoorenburg <miquels>, but have not heard
back from him yet. I'm posting it here as an RFE to solicit feedback.

The patch currently uses readdir(3), which does not return the file names in
lexicographic order.  It would be trivial to use scandir(3) to sort the file
list, but I have not done so, for two reasons: (1) increased memory usage, and
(2) scandir is a non-POSIX interface.  Is order important?

I chose to ignore hidden files and files ending in '~'; this is fairly common
for other tools that include files from a directory, such as cron or logrotate.

Any comments are welcome; I will be happy to rework it to
your liking, if you are inclined to add this functionality.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Packages that wish to have their daemons supervised by init need to edit
/etc/inittab on [un]install.  The same is true for dynamically added terminal
devices, e.g., "mgetty ttyACM0".

Additional info:

Comment 1 Bill Rugolsky, Jr. 2003-09-25 14:55:01 UTC
Created attachment 94717 [details]
Add support for /etc/inittab.d/

I'm running this patch on my laptop with all mingetty services in
/etc/inittab.d/tty*.  Adding and removing files and invoking "telinit q" works
as expected. Reading a directory instead of a single file introduces races, but
they seem no worse than similar races elsewhere.

Comment 2 Bill Rugolsky, Jr. 2003-09-25 15:16:37 UTC
Created attachment 94719 [details]
Add missing continue statement to stat() error path

Comment 3 Bill Nottingham 2005-01-28 06:28:31 UTC
Deferring; I'm not quite certain how often use cases for this would
come up from a packaging standpoint that would require a .d directory
(as opposed to a local use standpoint, where editing inittab is simpler.) 


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