InitScriptStatusActions

Differences between revisions 8 and 9
Revision 8 as of 2008-07-21 22:27:22
Size: 4641
Editor: cpe-66-68-158-133
Comment: added list of init scripts
Revision 9 as of 2008-07-21 22:30:30
Size: 4751
Editor: cpe-66-68-158-133
Comment: add dpkg -S bit
Deletions are marked like this. Additions are marked like this.
Line 72: Line 72:

You can run '''dpkg -S /etc/init.d/...''' to determine the source package of any of the following scripts.

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.

You can run dpkg -S /etc/init.d/... to determine the source package of any of the following scripts.

/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)