Ask Your Question

service startup order

asked 2016-05-26 17:38:57 -0600

rahvee gravatar image

If you enable a service like this:

service { 'myservice':
    ensure => running,
    enable => true,
    require => File['/etc/init.d/myservice'];

file { '/etc/init.d/myservice':
    content => "puppet:///modules/myservice/myservice",
    ensure => present,
    owner => root,
    group => root,
    mode => 0755,

Then puppet creates /etc/rc3.d/S??myservice and in my case, it always creates S65myservice. Where does the 65 come from? If puppet is choosing 65 consistently, it must be determined somewhere, but I don't know how it's making that decision. I'd like to make this service start later in the boot process, for example S99myservice.

edit retag flag offensive close merge delete


Which operating system are you using? For example, on RedHat systems, the startup order is determined by checkconfig which consults comments in the init script.

csharpsteen gravatar imagecsharpsteen ( 2016-05-26 23:23:52 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-05-27 06:08:14 -0600

rahvee gravatar image

Thanks, @csharpsteen. That completely answers it. The order can be changed by adding a chkconfig clause to the startup script, such as:

# chkconfig: 35 59 80

The above service should start at run level 3 and 5 using startup order 59, and shutdown order 80.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-05-26 17:38:57 -0600

Seen: 361 times

Last updated: May 27 '16