Scripts need to be migrated from /etc/event.d to /etc/init

Bug #402759 reported by noah on 2009-07-21
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
upstart (Ubuntu)
Scott James Remnant (Canonical)
Scott James Remnant (Canonical)

Bug Description

Binary package hint: upstart

I've got a system that was initially installed with Ubuntu Hardy.
During May or June it was upgraded to Ubuntu Karmic.

It's running with the console on ttyS0 which is a serial interface.
The kernel is booted with 'console=ttyS0,57600n8' on the command line and then I had a getty to start listening on /dev/ttyS0 by creating a /etc/event.d/ttyS0 file.

During an upgrade (apt-get dist-upgrade) somewhere in early July the getty is no longer started on /dev/ttyS0.

This is what things used to look like in /etc/event.d/
root@ubuntu:/etc/event.d# grep /getty tty*
tty1:exec /sbin/getty -8 38400 tty1
tty2:exec /sbin/getty -8 38400 tty2
tty3:exec /sbin/getty -8 38400 tty3
tty4:exec /sbin/getty -8 38400 tty4
tty5:exec /sbin/getty -8 38400 tty5
tty6:exec /sbin/getty -8 38400 tty6
ttyS0:exec /sbin/getty -L ttyS0 57600 vt102

Now, after the upgrade in early July it seems as if the file in /etc/event.d are no longer used.
The getty for ttyS0 is no longer started.

Instead the files responsible for launching gettys are located in /etc/init.

After "porting" the old /etc/event.d/ttyS0 file to the new format used by the upstart package and placing it in /etc/init as ttyS0.conf I got getty back on /dev/ttyS0.

I'm not entirely sure what happened but it seems as if my installation, after the dist-upgrade in early July, stopped using stuff from the package system-services and instead started using files from the package upstart.

Whatever happened in my case, when /etc/event.d stopped being used, should have been handled better.
Just imagine an upgrade on a co-located machine (which migt not be easily accessible) which will result in an administrators no longer being able to login on the serial console.

Here's output from dpkg that shows what package owns which files, using the launch file for tty1 as an example:
# dpkg -S /etc/event.d/tty1 /etc/init/tty1.conf
system-services: /etc/event.d/tty1
upstart: /etc/init/tty1.conf

For what it's worth:
# dpkg -l|egrep 'system-services|upstart|console'
ii console-setup 1.34ubuntu1 console font and keymap setup program
ii console-terminus 4.28-1 Fixed-width fonts for fast reading on the Li
ii consolekit 0.3.0-2ubuntu7 framework for defining and tracking users, s
ii kbd 1.15-1ubuntu1 Linux console font and keytable utilities
rc system-services 0.3.10-2 definitions of essential system services
ii upstart 0.6.1-1 event-based init daemon
rc upstart-compat-sysv 0.3.10-2 compatibility for System-V-like init
rc upstart-logd 0.3.10-2 boot logging daemon

# lsb_release -rd
Description: Ubuntu karmic (development branch)
Release: 9.10

description: updated
noah (noah1-deactivatedaccount) wrote :

If something regarding /etc/event.d has changed in Ubuntu Karmic I suppose the instructions for running Ubuntu with a serial console should be updated on to reflect the new behavior.

 status triaged
 importance medium
 milestone alpha-4

On Tue, 2009-07-21 at 22:23 +0000, noah wrote:

> Whatever happened in my case, when /etc/event.d stopped being used,
> should have been handled better.
It will be.

Remember that you're running a development distribution and not a final
release yet.

The migration scripts to deal with moving things from /etc/event.d
to /etc/init haven't been written yet - this is why things
in /etc/event.d have deliberately not been deleted yet.

Scott James Remnant
<email address hidden>

summary: - Karmic update broke serial console on ttyS0 (related to system-services
- vs upstart?)
+ Scripts need to be migrated from /etc/event.d to /etc/init
Changed in upstart (Ubuntu):
assignee: nobody → Scott James Remnant (scott)
milestone: none → karmic-alpha-4
Changed in upstart (Ubuntu):
milestone: karmic-alpha-4 → ubuntu-9.10
Michael Lazarev (milaz) wrote :

Sorry, I'm not sure where to report this to, I'd also notice that consoles do not work with cleanly made live USB from Karmic Beta image. And being manually fixed, are broken again with partial upgrade.

I described the problem and the solution in my comment to bug 438678.

Jamie Kitson (jamie-kitson) wrote :

Scott James Remnant wrote on 2009-07-21:

> > Whatever happened in my case, when /etc/event.d stopped being used,
> > should have been handled better.
> >
> It will be.

Has that been done yet? I guess not. I ran into this problem too, my /etc/event.d/tty1 script was not migrated.

Steve Langasek (vorlon) wrote :

Too fiddly to do this without a safety net between RC and final, and not worth doing as an SRU; dropping the karmic target.

Changed in upstart (Ubuntu Karmic):
status: Triaged → Won't Fix

It proves difficult to figure out what the user intended to change, so we're going to Release Note this issue with a migration guide wiki page that I'm currently writing

affects: upstart → ubuntu-release-notes
Changed in ubuntu-release-notes:
assignee: nobody → Scott James Remnant (scott)
Changed in upstart (Ubuntu):
status: Triaged → Won't Fix
Changed in ubuntu-release-notes:
status: New → In Progress

I checked 9.10 RC, consoles are back. So, the part of the problem I
was concerned with is resolved.

Steve Langasek (vorlon) wrote :

Hi Scott,

What's the status of the mgration guide wiki page you mentioned?

Also, is it intentional that this is marked "wontfix" for Ubuntu generally? An automigration script in lucid would still be useful for LTS->LTS upgrades.

Changed in ubuntu-release-notes:
importance: Undecided → Medium

On Wed, 2009-10-28 at 13:12 +0000, Steve Langasek wrote:

> What's the status of the mgration guide wiki page you mentioned?
Pending, I may have time to write it tomorrow.

> Also, is it intentional that this is marked "wontfix" for Ubuntu
> generally? An automigration script in lucid would still be useful for
> LTS->LTS upgrades.
No, because I can't figure out how to do it - and it'll get "not done"
for lynx.

Scott James Remnant
<email address hidden>

Steve Langasek (vorlon) wrote :

Preliminary note included at <>:

The version of upstart included in Ubuntu 9.10 no longer uses the configuration files in the /etc/event.d directory, looking to /etc/init instead. No automatic migration of changes to /etc/event.d is possible. If you have modified any settings in this directory, you will need to reapply them to /etc/init in the new configuration format by hand. (402759)

Once a transition wiki page is available, we can link that here as well.

Dmitri (dmitri-internode) wrote :

It is nice to have that preliminary note - but it would be even better if it contained some reference to "the new configuration format ". So far my search gave me as the closest to documentation (it even references some standard - but the link is dead). Anything else is outdated.
How exactly it was envisioned that users will upgrade their servers which stopped starting, I wonder :(

Changed in ubuntu-release-notes:
assignee: Scott James Remnant (scott) → nobody
Dooitze de Jong (dooitze) wrote :

Why don't you fix this?

Answer is above; we couldn't figure out *how* to - so release noted it instead

Dooitze de Jong (dooitze) wrote :

With a commandline script

paul fox (pgf-launchpad) wrote :

echoing comment #11: where are the differences between the "new" and "old" formats documented?

Alberto (apedraza) wrote :

So, can I just copy my event.d scripts to the new init directory?

mb0 (mb0) wrote :

it seems all you need to do is to append a .conf file extension.
mv /etc/event.d/yourscript /etc/init/yourscript.conf

I, too am looking for documentation on .conf file format. Particularly, i want a service to never start automatically... but to stay installed. What is the most appropriate way of doing this? Remove/comment all 'start on' lines?

Robbie Williamson (robbiew) wrote :

Release noted again for 10.10.

Changed in ubuntu-release-notes:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers