Adding a status action to init scripts

Surely if you have administered a Linux server, you have used the scripts in /etc/init.d/ to start, stop, and restart system services. What about the status action to determine if a given service is up and running?

The Ubuntu Server team has initiated a concentrated effort to add status actions to the most commonly used init scripts. We’re recruiting current and aspiring Ubuntu developers to help patch these init scripts. Some Unix shell programming and basic Debian packaging skills are all that is required.

Basically, you need to do:

  1. grab the source
  2. add two lines to the service’s init script
  3. add a dependency in the control file
  4. create a changelog entry
  5. post a debdiff to a Launchpad bug.

There is detailed step-by-step checklist for creating and submitting such packages on the wiki page.

The Linux Standard Base 3.1 has a specification for init scripts actions. A simple function has been added to the LSB base library /lib/lsb/init-functions. This shell function, status_of_proc(), can be used in most init scripts to report status.

The list of init scripts that need work is also maintained in the wiki page. Join us in IRC at #ubuntu-server if you are interested in helping!

2 Responses to “Adding a status action to init scripts”


  1. 1 Tyrone Thursday, 24 July 2008 at 8:17 pm

    Is this going upstream, is upstream not suitable, or not interested? Sounds like this would be a great thing to get all around so more tools can rely on it and use it.

  2. 2 dustinkirkland Monday, 28 July 2008 at 3:20 pm

    The status_of_proc() library function is already in Debian’s lsb-base package.

    The individual patches to each package should definitely be pushed back to Debian.

    As for the projects upstream of Debian, init scripts are generally handled at a distribution level.

    :-D ustin


Leave a Reply




The Ubuntu Server Team

RSS Dustin Kirkland’s Ubuntu Server posts

  • QEMU in Launchpad
    QEMU provides the userspace and device emulation required by KVM. As such, it's an extremely important project to Ubuntu's virtualization and cloud computing efforts.The upstream project has not had an actively maintained bug tracker for quite some time.I recently helped QEMU's maintainer, Anthony Liguori setup a Launchpad project for trackin […]
  • KVM's inside of Byobu
    Here's a neat trick that I find phenomenally useful...I like to run KVM virtual machines inside of Byobu, using KVM's -curses option. From QEMU's manpage:Normally, QEMU uses SDL to display the VGA output. With this option, QEMU can display the VGA output when in text mode using a curses/ncurses interface. Nothing is displayed in graphical m […]
  • KVM-84 Backport Release Candidate
    Howdy,On March 17, 2009, I blogged the following call for testing:http://blog.dustinkirkland.com/2009/03/ubuntu-server-kvm-call-for-testing.htmlWe have worked through a number of the issues raised after that blog post, and cherry-picked several patches that fix some known bugs. We believe that Ubuntu 9.04's kvm-84 is a far more complete hypervisor.This […]

RSS Kees Cook’s Ubuntu Server posts

  • Goodbye Gutsy
    (In reading my prior EOL posts, I realize I should have said “Enough Edgy” or something like that to be appropriately alliterative.) Gutsy is now officially at end-of-life. Looking back through my build logs, I can see that my desktop spent 25 hours, 6 minutes, and 47 seconds building 208 security updates. (And 18 hours, 23 minutes, 45 seconds do […]
  • CODEGATE 2009 ran Ubuntu Intrepid
    I’m pleased to hear than the CODEGATE 2009 International Hacking Contest ran Ubuntu Intrepid for both the qualifying rounds and the final match. The host machine was running the 32bit -server kernel, so NX was active (along with all the other memory-corruption protections). From what I can see the compiled challenges were stack-protected and fortifie […]
  • debugging hangs in MIMEDefang
    I spent a while this morning hunting down the root cause of a 100% CPU MIMEDefang process. (Turned out to be one specific email triggering one of my custom SpamAssassin rules that seems to get processed really inefficiently.) I wasn’t able to find any documentation on how to debug where in MIMEDefang an email was getting stuck, and even jacking up th […]

RSS Mathias Gug’s Ubuntu Server posts

  • Merges of the Weekend: suggestions from the Ubuntu Server team
    Got some time for a couple of merges this week-end? I’ve just updated the list of packages that look easy to merge on the Ubuntu Server Team roadmap: vsftpd and amavisd-new in main asterisk, heimdal and boinc in universe. The Merging wiki page gives an overview on the process and once your debdiff is ready you can upload it to karmic or file a bug […]
  • Are configuration management tools still needed in the cloud?
    Cloud is the buzz word of the year and with the Ubuntu Enterprise Cloud available in Ubuntu 9.04 everyone will be able to build its own private cloud to experiment. As a cloud base infrastructure provides more flexibility and dynamism in the computing infrastructure it seems that configuration management tools will become more and more important in the futur […]
  • March, 12th 2009: The Thursday samba bugs were exterminated
    I call for Ubuntu Bug warriors to unite on the 12th day of the month of March of the year of 2009 and march all together to squash bugs related to the samba package. Instructions for first timers will be provided in a wiki page as well as a list of prime targets. Veterans are also encouraged to join and focus on the most complex issues while providing suppor […]

RSS Thierry Carrez’s Ubuntu Server posts

  • Best UDS so far ?
    UDS Karmic in Barcelona is shaping up to be a great Ubuntu Developer Summit. The venue looks gorgeous, Barcelona is a great city to spend evenings in, and the schedule is packed with great sessions, twice as many as usual in the Server track. So if you live nearby and consider joining, you should definitely do. You can learn a lot, we can learn from you, you […]
  • The server GUI dilemma
    Among the many comments on my last article there were calls for a graphical administration interface, i.e. providing by default a desktop environment on the server (like Microsoft or Redhat do) or some web-based admin application. This is an often required feature, and so far we stood firm on the desktop environment part, and did not really invest in integra […]
  • What I want Ubuntu Server to be
    What we call “Ubuntu Server” is currently a basic system, released together with a giant set of packages that you can install. Being Debian-based, the result is very close to what Debian also delivers: a powerful base platform that can be customized to do almost anything. We add some killer features and packages that we feel are missing, do some […]

RSS Rick Clark’s Ubuntu Server Posts

  • Next Stop UDS
    All the Canonical folks are meeting this week prior to UDS.  We’ve already had some great discussions including: Canonical Plan for World Domination — text redacted — (Sorry, if I told you, I’d have to kill you.) Actually, it is a great time to see all our co-workers from across the globe.  However, I can’t wait for next week, […]
  • UDS Barcelona Has Incredible Potential
    This UDS each track will have two session rooms, plus a breakout room. That means we will have, at least, twice as many sessions. We should some out of it with twice as many specs for new features. My question is, how will we handle twice the data? In previous UDS’ the server track was very well documented, thanks to Adam Sommer from the documentati […]
  • I’ll be at the Free Software & Technology Expo in St Louis, MO on Saturday
    I’ll be speaking at the Free Software & Technology Expo tomorrow May 9th. My talk will cover: * What’s new in Jaunty, including the Ubuntu Enterprise cloud * Hints of what might come in Karmic, and a UDS preview * Observations from the front line (or What it’s like to work for Canonical, and the furious pace of our 6 month release cy […]

RSS Jamie Strandboge’s Ubuntu Server Posts

  • ext4 on Ubuntu 9.04
    It all started back in the good ol’ days of the Jaunty development cycle when I heard this new fangled filesystem thingy called ext4 was going to be an option in Jaunty. It claimed to be faster with much shorter fsck times. So, like any good Ubuntu developer, I tried it. It was indeed noticeably faster and fsck times were much improved. The honeymoon w […]
  • ufw status
    While not exactly news as it happened sometime last month, ufw is now in Debian and is even available in Squeeze. What is new is that the fine folks in Debian have started to translate the debconf strings in ufw, and during the process the strings are much better. Thanks Debian! In other news, ufw trunk now has support for filtering by interface. To use it, […]

 

July 2008
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031