Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi can i use the old style init scripts under ub 12.04? im fed up with my upstart scripts working intermittently.

I have a process which relies on cifs mounts (defined in fstab). I've tried all the usual 'wait for the interface' and 'wait for the local filesystem' dependencies in my upstart but nothing seems to work. My command works fine on the cmd line.

I think what's happening is that cifs hasn't mounted at the time the upstart script tries to run. Upstart just seems broken to me.

start on (local-filesystems and net-device-up IFACE=eth0 and mounted MOUNTPOINT=/storage/server)
stop on shutdown

expect daemon

cd /storage/server/scripts/myprog
su -c "/home/gurpal2000/ruby-1.9.3-p0/bin/bundle exec /home/gurpal2000/ruby-1.9.3-p0/bin/ruby lib/main.rb > /storage/server/logs/myprog.txt 2>&1" gurpal2000
end script


share|improve this question

migrated from May 17 '12 at 3:11

This question came from our site for professional and enthusiast programmers.

Upstart is not broken. Take a look at the following:

I think you may be able to simplify your 'start on' to be simply:

start on (filesystem and static-network-up)

Take a look at upstart-events(7), or online here:

See also:

Upstart still supports SysV jobs, so if you really want to you can create /etc/init.d/foo.

share|improve this answer

I haven't tried replacing Upstart with good old SysV-init, but it should be doable; at least, swapping among init-replacements in the past was pretty straightforward. You just need to be sure that you're replacing at a minimum the following programs:


The package manager will try to restart init when a new C library is installed; hopefully this is managed through the standard telinit interface rather than hard-coded to Upstart mechanisms specifically.

And I certainly wouldn't expect event-managed scripts to run -- plugging in USB sticks might require you to mount them yourself. (Which, in my opinion, is the better approach anyhow.)

Before giving up on your Upstart configuration file though, have you tried:

start on mounted MOUNTPOINT=/path/to/mountpoint
share|improve this answer
Hi yes i tried the mounted stanza also, no effect (added code to the OP) – gurpal2000 May 16 '12 at 23:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.