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

Debugging a LSB init script under systemd



Hi all,

Is there any way to debug a LSB init script under systemd?  I'm trying
to write an init script for a service that starts multiple daemons, much
like OpenVPN and how it starts a separate daemon for each connection.

So I've taken the OpenVPN init script and hacked it to make it do what I
want.  One problem I had though was getting any useful debugging output.

The OpenVPN init script takes a parameter DEBIAN_SCRIPT_DEBUG.  I've
tried setting that in my environment and exporting it, to no avail.
I've also tried running the init script directly with `sh -ex`, again,
no dice.  systemd immediately swallows the DEBIAN_SCRIPT_DEBUG as well
as any useful output from the init script itself.

The suggested `journalctl -xn` provides minimal assistance.  I also seem
to lose the ability to see the script's status report when I run
`/etc/init.d/foo status`: I get systemd's view of the situation instead.

Is there a way to tell systemd to LEAVE the script alone while I debug
it and get it working?

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.


Reply to: