Differences between revisions 35 and 36
Revision 35 as of 2008-07-24 04:32:42
Size: 7336
Editor: 190
Revision 36 as of 2008-07-24 05:17:08
Size: 7271
Editor: cpe-66-68-158-133
Comment: move mythtv-status to the no-fix stack
Deletions are marked like this. Additions are marked like this.
Line 77: Line 77:
 1. mythtv-status wiki:Bug:251330 (Patch submitted, awaiting universe sponsorship)
Line 139: Line 138:
 1. mythtv-status


The LSB suggests that init scripts provide a status action:

DustinKirkland worked with Debian to [ provide a method],  status_of_proc() , in /lib/lsb/init-functions, in the [ lsb-base] library package. This function is fully integrated in Intrepid as of [ lsb-3.2-14].

Adding status actions to init scripts

Numerous init scripts should be patched to call  status_of_proc()  and provide a status action. A simple recipe follows for adding such 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 and build dependencies
    •  apt-get source FOO 

    •  sudo apt-get build-dep FOO 

  4. Locate the init script in the source tree, sometimes
    •  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-14

    • add the changelog entry referencing your Launchpad bug, (LP: #999999)
  6. Test your patched init script for the new functionality and regressions
    •  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
  10. Add your patch to the Launchpad bug you filed, mark as In Progress

  11. Subscribe kirkland, and (ubuntu-main-sponsors or ubuntu-universe-sponsors) as appropriate

  12. For bonus points, file a bug in Debian, and work the patch back upstream!

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.

Init scripts with daemon(s)

  1. acpid
  2. at: wiki:247091 (FIXED)

  3. bind9: wiki:247084 (Patch submitted, awaiting main sponsorship)

  4. bip: wiki:251287 (Patch submitted, awaiting universe sponsorship), [ Debian #492126]

  5. bluetooth
  6. bootlogd
  7. brltty
  8. cron: wiki:201504 (FIXED)

  9. dbus
  10. dhcdbd
  11. dovecot: wiki:247096 (FIXED)

  12. gdm: wiki:251375 (Debdiff Uploaded, awaiting revision)

  13. hal
  14. kdm
  15. mysql
  16. mysql-ndb
  17. mysql-ndb-mgm
  18. mythtv-backend wiki:251325 (Patch submitted, awaiting universe sponsorship)

  19. openvpn
  20. openssh: wiki:247103 (FIXED)

  21. powernowd
  22. pulseaudio (Be careful with this one: the default for desktop installs is via session, not via this initscript.)
  23. rsync: wiki:251320 (Patch submitted, awaiting main sponsorship), [ Debian #492138]

  24. samba: wiki:247087 (Patch submitted, awaiting main sponsorship)

  25. squid: wiki:251299 (Patch submitted, awaiting main sponsorship), [ Debian #492131]

  26. sysklogd: wiki:247106 (FIXED)

  27. system-tools-backends
  28. usplash
  29. winbind: wiki:247087 (Patch submitted, awaiting main sponsorship)

Init scripts without daemon(s)

No daemon, but detectable status

The following init scripts do not have an associated daemon, however, they do perform actions on the system which could be algorithmically checked. I'm noting some suggested items that could be checked in a 'status' action.

  1. apport - status should look at /proc/sys/kernel/core_pattern
  2. binfmt-support - status should check update-binfmts --display, perhaps
  3. - status could show the time/date/results of the last check
  4. - similar to, perhaps?
  5. mountoverflowtmp - status could check the tmp mountpoint
  6. networking - status could check network connectivity
  7. pcmciautils - status could check lsmod for needed modules
  8. policykit - status could check directory existence and permissions
  9. rmnologin - status could check /var/lib/initscripts/nologin
  10. screen-cleanup - status could check /var/run/screen
  11. single - status could check if in single user mode or not
  12. skeleton - the skeleton init script itself should be enhanced to have a status action!
  13. urandom - status could check /dev/urandom

No daemon

The following init scripts do not have an associated deamon. On initial review of the code, a 'status' action for these scripts does not necessarily make sense. If you have an idea of a sensible status action, please note the suggestion and move the item to the list above (detectable status).

  1. acpi-support
  2. alsa-utils
  5. console-setup
  6. dns-clean
  8. halt
  10. hotkey-setup
  13. keyboard-setup
  14. killprocs
  15. loopback
  16. module-init-tools
  23. mythtv-status
  24. powernowd.early
  25. pppd-dns
  26. procps
  27. rc
  28. rc.local
  29. rcS
  30. readahead
  31. readahead-desktop
  32. reboot
  33. resolvconf
  34. sendsigs
  35. stop-bootlogd
  36. stop-bootlogd-single
  37. stop-readahead
  38. umountfs
  40. umountroot
  41. vbesave
  42. wpa-ifupdown
  43. xserver-xorg-input-wacom






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