#680293: update-rc.d: Fix behaviour with --force to match manapage

Mark Hindley mark at hindley.org.uk
Sun Nov 22 12:17:35 GMT 2026


Hi,

I think the real fix for the underlying behaviour so that it correctly matches
what is described in the manpage is:

>From 7436e4ff6d1b3c340906478e107efc0556b9c0c5 Mon Sep 17 00:00:00 2001
From: Mark Hindley <mark at hindley.org.uk>
Date: Sun, 22 Nov 2026 11:05:09 +0000
Subject: [PATCH] update-rc.d: fix passing on of force option.

Even when @_ is (0),

  $force = (@_);

is in scalar context and therefore $force is always 1.

Closes: #680293
---
 script/update-rc.d | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/script/update-rc.d b/script/update-rc.d
index 59fa374..9f2b6c7 100755
--- a/script/update-rc.d
+++ b/script/update-rc.d
@@ -195,7 +195,7 @@ sub make_systemd_links {
 }
 
 sub create_sequence {
-    my $force = (@_);
+    my ($force) = @_;
     my $insserv = "$dpkg_root/usr/lib/insserv/insserv";
     # Fallback for older insserv package versions [2014-04-16]
     $insserv = "/sbin/insserv" if ( -x "$dpkg_root/sbin/insserv");
-- 
2.53.0




More information about the Debian-init-diversity mailing list