/etc/init.d/brltty checks md5sum when not necessary

Bug #370728 reported by lavinog
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
brltty (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: brltty

In Ubuntu 9.04, /etc/init.d/brltty will check the md5sum of /etc/brltty.conf prior to checking existence and without reason.
This is a wasted operation during boot.

recommend removing this line:
BRLTTY_CONF_MD5SUM=$(md5sum /etc/brltty.conf)

And changing this block of code:
-------------------------------------------------------------------------
# /etc/brltty.conf may need to be propagated from the initramfs. (This is a
# pretty awful hack.)
if [ -e /dev/.initramfs/brltty.conf ] && [ -e /etc/default/brltty ]; then
 if [ -e /etc/brltty.conf ] && [ "$BRLTTY_CONF_MD5SUM" = "$BRLTTY_CONF_PKG_MD5SUM" ]; then
  mv /etc/brltty.conf /etc/brltty.conf.orig
  mv /dev/.initramfs/brltty.conf /etc/brltty.conf
 fi
 sed -i -e 's/^RUN_BRLTTY=.*/RUN_BRLTTY=yes/' /etc/default/brltty
fi
-------------------------------------------------------------------------

to:
-------------------------------------------------------------------------
# /etc/brltty.conf may need to be propagated from the initramfs. (This is a
# pretty awful hack.)
if [ -e /dev/.initramfs/brltty.conf ] && [ -e /etc/default/brltty ]; then
 if [ -e /etc/brltty.conf ] && [ "$(md5sum /etc/brltty.conf)" = "$BRLTTY_CONF_PKG_MD5SUM" ]; then
  mv /etc/brltty.conf /etc/brltty.conf.orig
  mv /dev/.initramfs/brltty.conf /etc/brltty.conf
 fi
 sed -i -e 's/^RUN_BRLTTY=.*/RUN_BRLTTY=yes/' /etc/default/brltty
fi
-------------------------------------------------------------------------

Related branches

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

In addition to that, I get a "command not found" error for md5sum. Probably because I have /usr as a separate partition which is not mounted yet.

Revision history for this message
Jayen (jayen) wrote :

I'm getting a command not found also for md5sum. My /usr is also separate.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package brltty - 4.0-8ubuntu2

---------------
brltty (4.0-8ubuntu2) lucid; urgency=low

  * debian/rules: don't install /etc/brltty.conf in the package - we're
    dynamically editing this from the initramfs, so this really isn't suitable
    to be a conffile.
  * revert changes to check the md5sum before copying over the configuration
    from the initramfs: the source file *only* exists when braille=ask is
    passed on the kernel commandline, so there is simply no reason to *not*
    respect the options specified and overwrite /etc/brltty.conf (especially
    now that it's no longer a conffile). LP: #409802, #370728.
 -- Steve Langasek <email address hidden> Tue, 17 Nov 2009 04:43:13 +0000

Changed in brltty (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.