patch to update-rc.d
Hi Everyone,
This is my first post to debian-devel. A fairly long message, hope it
will be tolerated.
I am currently developing a perl script that lists rc?.d
configuration and you can find it here:
http://www.chara.gsu.edu/~deo/sources/list-rc.d
http://www.chara.gsu.edu/~deo/sources/README
README shows the typical usage and expected output. Also available
is a patch to update-rc.d that includes the functions from the script.
http://www.chara.gsu.edu/~deo/sources/update-rc.d.list.patch
This enhances update-rc.d.pl to have a rc configuration listing
functionality. It is however _not_ emulating Red Hat's chkconfig and is
based on suggestions given in this discussion:
http://lists.debian.org/debian-devel/2001/12/msg00743.html
It also lists active services in /etc/inetd.conf and
/etc/xinetd.conf and /etc/xinetd.d. Apart from that it has a option that
will sort a given rc?.d to present the complete execution order within
that runlevel.
The script and the patch is in Perl (since update-rc.d is written in
Perl). I would appreciate any help in improving it. I had sent the first
version of list-rc.d to Miquel but I guess it got lost in his mailbox.
Any suggestions, comments and future directions are welcome. I am not a
official debian developer but would love to become one in future, with
appropriate guidance.
Happy holidays and season's greeting to everyone,
Rajesh Deo.
Example output from patched update-rc.d:
-----------------> New usage message
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | sNN kNN]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
update-rc.d -l <basename>
update-rc.d --inetd
update-rc.d --xinetd
update-rc.d -r <runlevel>
-l: List rc configuration for <basename>
--inetd: List active services in /etc/inetd.conf
--xinetd: List active services in /etc/xinetd.conf and
/etc/xinetd.d
-r: List execution order for <runlevel>
Notes: Following extraneous files are ignored during rc listing.
* In /etc/init.d/: rc, rcS, skeleton, README,
* *.dpkg-*
* In /etc/xinetd.d/: None
-----------------> Service listing
root@localhost:~# update-rc.d -l anacron
#------------------------------------------------------------------------------
# System V Run Levels
# SYSV Service S 0 1 2 3 4 5 6
#------------------------------------------------------------------------------
anacron - - - (K11,S89) (K11,S89) (K11,S89) (K11,S89) -
----------------> Startup order
root@localhost:~# update-rc.d -r 0
K01 xdm
K11 anacron
K11 cron
K15 fetchmail
K19 aumix
K19 setserial
...
K20 autofs
K20 binfmt-support
K20 bootclean.sh
...
---------------> Listing xinetd services
root@localhost:~# update-rc.d --xinetd
#------------------------------------------------------
# xinetd services:
#------------------------------------------------------
chargen-dgram off
chargen-stream off
daytime-dgram off
...
Reply to: