Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5PKU-003Do1-1q for pgsql-general@arkaria.postgresql.org; Wed, 25 Mar 2026 14:35:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5PKT-00ENth-0I for pgsql-general@arkaria.postgresql.org; Wed, 25 Mar 2026 14:35:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5PKS-00ENtW-0r for pgsql-general@lists.postgresql.org; Wed, 25 Mar 2026 14:35:29 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5PKP-0000000156R-14vc for pgsql-general@lists.postgresql.org; Wed, 25 Mar 2026 14:35:28 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id 528F61D00150; Wed, 25 Mar 2026 10:35:23 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Wed, 25 Mar 2026 10:35:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1774449323; x=1774535723; bh=ZGqC6m5LGo/YLcXjc04ApOqn3HfimgRU78nWpB5M9cs=; b= JlzRzFi/7lK3g7KT3sOYrt3E+4hIngRlYl3ymidyj1Z+aLS/q82EfP7SI5Q2ckYz ut7WKDOkvGc0II8MCYFTmbvUtU+5q8rZs07MskyZCsFoZ5xyzfSMa1PyJacjlaQ+ Ibv1eKyGf6j24HuFSNNuhQoeaZb+/wyp9X1UKN7fEEWH3eyuOiTP++WudZiNKvw7 nR+blRHVTEjQY4kKt/MMJTt2tz7ydFeshSfKJgiKddJsM/+PrlxVbhZD3hSPf4wi n6tA214WQpZjxcuHZFkGyRmwyXNh8/X4HlmABtTEyEdkbrYB8GGY5zvfMj7s3pxc vDo4TCBMo+36/mm0zDBP6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1774449323; x=1774535723; bh=Z GqC6m5LGo/YLcXjc04ApOqn3HfimgRU78nWpB5M9cs=; b=W0qoQjZc7L1mUm+b3 gt1REFKHLi5tdQPseSIOIIvVfkiFBjiQE8VsXkKG4aDmFwaOktrYz6TB200TtHnI kpma6vMZ6NsD6cOGqkSa8dGpo62LG5iSfXV1VOYbBPKb277uc5o+ZVIUaV5wfLVW 9Qj5pVnK+9mchrVRfadjAulG53PoFIUJopzLlBR3CliwCQpDya/ud/IyNmJ5Ycf/ QQ5m10Ek2Gp8k/pj4q061CwwZXZFbaV11GW3vHaXP+f7G/m9qHtgdhQXcZ6Rfbxx xhipv1c1l4f6tDkUefOxKhAe28VWkTKJBj8o5ub5irtmlJJr0kAFesQuE0d35dMB JAdOQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdegjeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertd dtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepiedvhfeiheehge euieeljeeitedtjeehudegfeelkedvleekhedtgfeiffefkedunecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphho uhhtpdhrtghpthhtohepghhurhhusehunhhigigrrhgvrgdruggvpdhrtghpthhtohepph hgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Mar 2026 10:35:22 -0400 (EDT) Message-ID: Date: Wed, 25 Mar 2026 07:35:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: malformated LSB header in postgres: missing LSB end marker, aborting To: Matthias Apitz , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 adrian.klaver@aklaver.com