public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: Matthias Apitz <[email protected]>
To: [email protected]
Subject: Re: malformated LSB header in postgres: missing LSB end marker, aborting
Date: Wed, 25 Mar 2026 07:35:21 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <acO9k1XLTEmCo+sj@pureos>
References: <acO9k1XLTEmCo+sj@pureos>
On 3/25/26 3:48 AM, Matthias Apitz wrote:
>
> Hello,
>
> We use the following script as /etc/init.d/postgres on
> SuSE Linux Enterprise, SLES 15 SP7, to start PostgreSQL 16.5 server:
>
> $ tar tzf postgresql-16.5.tar.gz | grep start-scripts/linux
> postgresql-16.5/contrib/start-scripts/linux
>
> # cp postgresql-16.5/contrib/start-scripts/linux /etc/init.d/postgres
>
> # head -10 /etc/init.d/postgres
> #! /bin/sh
>
> # chkconfig: 2345 98 02
> # description: PostgreSQL RDBMS
>
> # This is an example of a start/stop script for SysV-style init, such
> # as is used on Linux systems. You should edit some of the variables
> # and maybe the 'echo' commands.
> #
> # Place this file at /etc/init.d/postgresql (or
> # ...
>
> Together with systemd services this gives the following error:
>
> # systemctl enable postgres.service
> Synchronizing state of postgres.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
> Executing: /usr/lib/systemd/systemd-sysv-install enable postgres
> error: malformated LSB header in postgres: missing LSB end marker, aborting.
>
> The service file contains:
>
> # cat /etc/systemd/system/postgres.service
> [Unit]
> Description=SunRise PostgreSQL server
> After=systemd-user-sessions.service
>
> [Service]
> ExecStart=/etc/init.d/postgres start
> ExecStop=/etc/init.d/postgres stop
> TimeoutStartSec=infinity
> RemainAfterExit=yes
>
>
> [Install]
> WantedBy=multi-user.target
>
> When I enhance the script with this section between BEGIN / END
>
> # cat /etc/init.d/postgres
> #! /bin/sh
> # chkconfig: 2345 98 02
> # description: PostgreSQL RDBMS
> ### BEGIN INIT INFO
> # Provides: postgresql
> # Required-Start: $network $named
> # Required-Stop:
> # Default-Start: 3 5
> # Default-Stop:
> # Description:
> ### END INIT INFO
> ...
>
> The error goes away:
>
> # systemctl enable postgres.service
> Synchronizing state of postgres.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
> Executing: /usr/lib/systemd/systemd-sysv-install enable postgres
> ln -sf ../postgres /etc/init.d/rc3.d/S50postgres
> ln -sf ../postgres /etc/init.d/rc5.d/S50postgres
>
> Any comments on this?
From the contrib script:
"# Proper init scripts on Linux systems normally require setting lock
# and pid files under /var/run as well as reacting to network
# settings, so you should treat this with care.
"
From the start script that the PGDG Debian/Ubuntu packages use:
### BEGIN INIT INFO
# Provides: postgresql
# Required-Start: $local_fs $remote_fs $network $time
# Required-Stop: $local_fs $remote_fs $network $time
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: PostgreSQL RDBMS server
### END INIT INFO
[Continued]
>
> Thanks
>
> matthias
>
>
--
Adrian Klaver
[email protected]
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: malformated LSB header in postgres: missing LSB end marker, aborting
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox