Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am running Ubuntu 12.04.3 LTS and installed several services like Samba, DHCP server, ...

I receive the following warning when I run "halt now", "telinit 6" or similar:

Since the script you are attempting to invoke has been converted
to an Upstart job, you may also use the...

I can see that the affected services try to stop/start twice. Once through the Upstart job and again through the S/K symlinks in the /etc/rcN.d folder which target the init.d script. Probably I can simply remove the symlink in the /etc/rcN.d folder.

Example flow:

  1. Run 'halt now' from shell
  2. Upstart stops Samba (because there is a Upstart conf file for Samba)
  3. SysV tries to stop Samba again (because there is also a /etc/rc0.d/K20smbd symlink)

I don't understand/want step 3 as it seems unnecessary and shows an ugly warning.

Why are there both, the Upstart script and and the symlinks to the init.d script, for several daemons? Is it the correct way that I have to manually clean up the duplicate symlinks in each /etc/rcN.d folder?

share|improve this question

closed as off-topic by Anthon, jasonwryan, manatwork, Mat, slm Sep 19 '13 at 11:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – jasonwryan, manatwork, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

    
@Moderator: please delete, this issue is not Linux related but was caused by an old Puppet version. –  Alex Sep 19 '13 at 5:49
1  
Problem caused by wrong setup as per OP –  Anthon Sep 19 '13 at 6:09
add comment

2 Answers 2

Ubuntu has compatibility init links that calls their counterparts upstart's whenever you run them.

If you call for example sudo /etc/init.d/apache start you get linked to upstart-job that presents you a nice information message that you should use sudo services apache start and then it runs the command by itself.

ls -l /etc/init.d/network-manager 
lrwxrwxrwx 1 root root 21 Sep 18 14:02 /etc/init.d/network-manager -> /lib/init/upstart-job

cat /lib/init/upstart-job
#!/bin/sh -e
# upstart-job
#
# Symlink target for initscripts that have been converted to Upstart.
{ lots of ASCII awesomeness }
share|improve this answer
    
That is a nice reminder when I accidentally run the old init.d script manually. But why are there symlinks in the rcN.d directories as well (updated question to be more specific)? –  Alex Sep 18 '13 at 21:13
    
I think this is what you are looking for unix.stackexchange.com/a/83752/41104 –  Braiam Sep 18 '13 at 21:23
    
I understand that a service can be active in different runlevels. I don't understand why SysV and Upstart are used in parallel. I added an example to the question. –  Alex Sep 18 '13 at 21:25
add comment

I figured out this is a misconfiguration in my Puppet scripts.

The 'service' type attribute 'enable' created the SysV init script instead of recognizing the Upstart script.

share|improve this answer
add comment

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