InitScriptStatusActions

Differences between revisions 7 and 8
Revision 7 as of 2008-07-16 14:09:19
Size: 2817
Editor: astatine
Comment: updated to show that Debian has accepted the base patch
Revision 8 as of 2008-07-21 22:27:22
Size: 4641
Editor: cpe-66-68-158-133
Comment: added list of init scripts
Deletions are marked like this. Additions are marked like this.
Line 68: Line 68:


== Init Scripts that Need a Status Action ==
The following is a crude list of init scripts in Intrepid that are lacking a "status" action. I say "crude" in that this list was generated on 2008-07-21 by installing the Intrepid Ubuntu (server, ubuntu-desktop, kubuntu-desktop, xubuntu-desktop), and grepping through /etc/init.d for scripts that lacked the string "status)". Please help improve this list by adding/removing init scripts to/from this list, and linking to a bug number. Please leave an informative note in this wiki page's changelog.

=== /etc/init.d/... ===
 1. acpid
 1. acpi-support
 1. alsa-utils
 1. apport
 1. binfmt-support
 1. bluetooth
 1. bootlogd
 1. bootmisc.sh
 1. brltty
 1. checkfs.sh
 1. checkroot.sh
 1. console-screen.sh
 1. console-setup
 1. dbus
 1. dhcdbd
 1. dns-clean
 1. gdm
 1. glibc.sh
 1. hal
 1. halt
 1. hostname.sh
 1. hotkey-setup
 1. hwclockfirst.sh
 1. hwclock.sh
 1. kdm
 1. keyboard-setup
 1. killprocs
 1. loopback
 1. module-init-tools
 1. mountall-bootclean.sh
 1. mountall.sh
 1. mountdevsubfs.sh
 1. mountkernfs.sh
 1. mountnfs-bootclean.sh
 1. mountnfs.sh
 1. mountoverflowtmp
 1. mtab.sh
 1. mysql
 1. mysql-ndb
 1. mysql-ndb-mgm
 1. networking
 1. openvpn
 1. pcmciautils
 1. policykit
 1. powernowd
 1. powernowd.early
 1. pppd-dns
 1. procps
 1. pulseaudio
 1. rc
 1. rc.local
 1. rcS
 1. readahead
 1. readahead-desktop
 1. reboot
 1. resolvconf
 1. rmnologin
 1. rsync
 1. screen-cleanup
 1. sendsigs
 1. single
 1. skeleton
 1. stop-bootlogd
 1. stop-bootlogd-single
 1. stop-readahead
 1. system-tools-backends
 1. udev
 1. udev-finish
 1. umountfs
 1. umountnfs.sh
 1. umountroot
 1. urandom
 1. usplash
 1. vbesave
 1. winbind
 1. wpa-ifupdown
 1. xserver-xorg-input-wacom

Overview

The LSB suggests that init scripts provide a status action:

status_of_proc() library function in lsb-base

DustinKirkland has worked with Debian to provide a status_of_proc() method in /lib/lsb/init-functions, which is provided by the lsb-base package. This function is fully integrated in Debian's lsb-3.2-14:

various init script callers

DustinKirkland has provided patches to the key service init scripts that are installable from the Ubuntu Server CD:

OnnoBenschop has provided a script to detect, and compiled a list of init scripts that are lacking status action here:

Countless other init scripts could/should be patched to provide this functionality.

Patch Checklist

When you encounter an init script that lacks a status action:

  1. Determine the source package
    • dpkg -S /etc/init.d/FOO
  2. Open a Bug in Launchpad against the package
  3. Grab the source
    • apt-get source FOO
    • sudo apt-get build-dep FOO
  4. Locate the init script in the source tree, often:
    • debian/*.init
    • debian/rc
  5. Patch the source to
    • have the init script call status_of_proc()
    • have the init script add "status" to the usage statement
    • add a dependency in debian/control for lsb-base >= 3.2-12ubuntu3

    • if you're sending to Ubuntu
      • add the changelog entry referencing your Launchpad bug
  6. Test your patched init script
    • sh debian/FOO.init status
    • echo $?
    • sudo sh debian/FOO.init stop
    • sh debian/FOO.init status
    • echo $?
    • sudo sh debian/FOO.init start
    • sh debian/FOO.init status
    • echo $?
  7. Build a source package
    • debuild -S
  8. Generate a patch
    • debdiff
  9. Compare your work to some of the other patches that did similar things.
  10. Add your patch to the Launchpad bug you filed

Init Scripts that Need a Status Action

The following is a crude list of init scripts in Intrepid that are lacking a "status" action. I say "crude" in that this list was generated on 2008-07-21 by installing the Intrepid Ubuntu (server, ubuntu-desktop, kubuntu-desktop, xubuntu-desktop), and grepping through /etc/init.d for scripts that lacked the string "status)". Please help improve this list by adding/removing init scripts to/from this list, and linking to a bug number. Please leave an informative note in this wiki page's changelog.

/etc/init.d/...

  1. acpid
  2. acpi-support
  3. alsa-utils
  4. apport
  5. binfmt-support
  6. bluetooth
  7. bootlogd
  8. bootmisc.sh
  9. brltty
  10. checkfs.sh
  11. checkroot.sh
  12. console-screen.sh
  13. console-setup
  14. dbus
  15. dhcdbd
  16. dns-clean
  17. gdm
  18. glibc.sh
  19. hal
  20. halt
  21. hostname.sh
  22. hotkey-setup
  23. hwclockfirst.sh
  24. hwclock.sh
  25. kdm
  26. keyboard-setup
  27. killprocs
  28. loopback
  29. module-init-tools
  30. mountall-bootclean.sh
  31. mountall.sh
  32. mountdevsubfs.sh
  33. mountkernfs.sh
  34. mountnfs-bootclean.sh
  35. mountnfs.sh
  36. mountoverflowtmp
  37. mtab.sh
  38. mysql
  39. mysql-ndb
  40. mysql-ndb-mgm
  41. networking
  42. openvpn
  43. pcmciautils
  44. policykit
  45. powernowd
  46. powernowd.early
  47. pppd-dns
  48. procps
  49. pulseaudio
  50. rc
  51. rc.local
  52. rcS
  53. readahead
  54. readahead-desktop
  55. reboot
  56. resolvconf
  57. rmnologin
  58. rsync
  59. screen-cleanup
  60. sendsigs
  61. single
  62. skeleton
  63. stop-bootlogd
  64. stop-bootlogd-single
  65. stop-readahead
  66. system-tools-backends
  67. udev
  68. udev-finish
  69. umountfs
  70. umountnfs.sh
  71. umountroot
  72. urandom
  73. usplash
  74. vbesave
  75. winbind
  76. wpa-ifupdown
  77. xserver-xorg-input-wacom

InitScriptStatusActions (last edited 2009-11-29 13:27:58 by 77-21-62-108-dynip)