ec2-set-defaults symlinks /etc/default/locale in wrong location

Bug #387611 reported by Stephen Leavitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EC2 init scripts
Fix Released
Undecided
Unassigned
Ubuntu on EC2
Fix Released
Undecided
Unassigned

Bug Description

Bug filed specfically against ec2-init_0.3.4ubuntu3~jaunty1 in http://ppa.launchpad.net/ubuntu-on-ec2/ppa/ubuntu, though it is possible that other versions may also be affected.

The set_language method creates a symlink for /etc/default/locale that points to the wrong location:
---
    mp = {'lang' : lang }
    T = Template(file="/etc/ec2-init/templates/locale.tmpl", searchList=[mp])
    f = open("/var/ec2/locale", "w")
    f.write('%s' %(T))
    f.close()

    if not os.path.exists("/etc/default/locale-ec2-init"):
        os.system("mv /etc/default/locale /etc/default/locale-ec2-init")
        os.symlink("/var/run/ec2/locale", "/etc/default/locale")
        os.system(". /etc/default/locale")
---
The template is written out to /var/ec2/locale, but it attempts to symlink /var/run/ec2/local to /etc/default/locale. The changelog seems to indicate that /var/run/ec2 was moved to /var/ec2 to avoid having it removed after a user reboots an EC2 instance. I imagine that this one was just overlooked. I pulled the source for this version, and this was the only occurrence of /var/run/ec2 in it.

The AMI is a custom built one for Ubuntu Jaunty using VMBuilder-0.11 from https://code.launchpad.net/vmbuilder

lsb_release -d:
  Description: Ubuntu 9.04

uname -a
  Linux domU-12-31-38-01-C5-C7.compute-1.internal 2.6.28-9-xen #1 SMP Tue Apr 21 13:37:36 UTC 2009 i686 GNU/Linux

Revision history for this message
Soren Hansen (soren) wrote :

Thanks for your bug report. This will be fixed in the next ec2-init version.

Changed in ec2-init:
status: New → Fix Committed
Changed in ubuntu-on-ec2:
status: New → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

Code is largely different now than the hunk in the description. However,
http://ec2-images.ubuntu.com/karmic/20090811.2/ubuntu-ec2-karmic-amd64.img.gz (ec2-init 0.4.99-0ubuntu2) has the following:

$ dpkg-query --showformat '${version}\n' --show "ec2-init"
0.4.99-0ubuntu2

setting of locale should now be done only once_ever (run_once_ever) and setting locale is done via update-locale to write /etc/default/locale.

Changed in ubuntu-on-ec2:
status: Fix Committed → Fix Released
Changed in ec2-init:
status: Fix Committed → 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.