[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: update-rc.d creates unexpected sequence numbers



Hi! Ansgar,

On Sun, May 15, 2016, at 10:05 PM, Ansgar Burchardt wrote:
> 
> That doesn't look correct: unless you defined a "$postgresql" system
> facility (in /etc/insserv.conf), you should require "postgresql" and
> not "$postgresql".
> 

Many thanks for the correction, which seems to have fixed my execution
problems.

After I remove the "$" to make the script look like this

#!/bin/sh
### BEGIN INIT INFO
# Provides:             my-program
# Required-Start:       postgresql
# Required-Stop:       postgresql
# Default-Start:        2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: My program.
 # Description:  My program.
 ### END INIT INFO

, command
update-rc.d my-program defaults 20 80
gives the correct orders of my-program and postgresql like so:

S02postgresql
S03my-program

and

K02my-program
K03postgresql

I think this start and stop orders of my-program will work as expected
now although the sequence numbers in /etc/rcN.d/* do not strictly follow
the rule suggested by "man update-rc.d", which I guess is trivial after
systemd has been in play.

Best regards,
CN

-- 
http://www.fastmail.com - Accessible with your email software
                          or over the web


Reply to: