Bug 105372 - RFE: Add /etc/inittab.d/ for improved modularity
RFE: Add /etc/inittab.d/ for improved modularity
Status: CLOSED WONTFIX
Product: Red Hat Raw Hide
Classification: Retired
Component: SysVinit (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
ftp://67.83.203.127/pub/sysvinit/sysv...
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-25 10:48 EDT by Bill Rugolsky, Jr.
Modified: 2014-03-16 22:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-28 01:28:31 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)
Add support for /etc/inittab.d/ (3.05 KB, patch)
2003-09-25 10:55 EDT, Bill Rugolsky, Jr.
no flags Details | Diff
Add missing continue statement to stat() error path (3.08 KB, patch)
2003-09-25 11:16 EDT, Bill Rugolsky, Jr.
no flags Details | Diff

  None (edit)
Description Bill Rugolsky, Jr. 2003-09-25 10:48:46 EDT
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@cistron.nl>, 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 10:55:01 EDT
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 11:16:37 EDT
Created attachment 94719 [details]
Add missing continue statement to stat() error path
Comment 3 Bill Nottingham 2005-01-28 01:28:31 EST
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.