Web lists-archives.com

Re: control the order of service initialization in the Debian 9


On Thu, Feb 21, 2019 at 07:53:11PM -0300, Marcio Demetrio Bacci wrote:
> Thank you for help me, but my problem persists.

Yup. Just as planned.

> I have already changed my file /etc/init.d/drbd
>         run_hook start_before-wait
>         $DRBDADM wait-con-int # User interruptible version of wait-connect
> all

This funny snippet forces init script to wait for partner nodes *or* for
the user interaction.
Works as intended for sysvinit, but systemd relocates all this user
interaction to the console.

And since the script does not get any interaction - systemd kills
appropriate unit for timing out:

> Feb 21 19:39:32 bkp systemd[1]: dev-drbd0.device: Job
> dev-drbd0.device/start timed out.

Personally I change the offending line to:

	/usr/bin/timeout 120 $DRBDADM wait-con-int || true
		# User interruptible version of wait-connect all

But that's hackish approach at best.