Removing old Sys-V init-script on upgrade
Lorenzo
plorenzo at disroot.org
Tue May 12 18:53:06 BST 2026
Hi Sven,
On Tue, 12 May 2026 13:28:52 +0200
Sven Hartge <sven at svenhartge.de> wrote:
> Hello!
>
> I am putting together a new version of my radsecproxy package which
> will make usage of the instance feature from systemd.
>
> The old Sys-V init-script does not really work for that anymore and I
> would like to remove it on upgrade.
In principle I don't see any issue, you could have a multi instance
systemd service and old single instance sysv script, debhelper will
make sure that there are no conflicts (but I know nothing specific to
radsecproxy): would you reconsider your decision if could get
assistance on simplifying/ refreshing the script?
If yes, the debian-init-diversity (in CC) list may be of help.
If you want to remove the script no matter what it would be nice if you
could file a bug against the orphan-sysvinit-scripts pacakge for a
coordinated handover, attaching the last version of the script.
>
> Before I now shoot myself (and others) into an appendage, this
> question here: What is the best (and safest) way of doing this?
>
> Is it really as easy as having
>
> if [ "$1" = "configure" ]; then
> if [ -e /etc/init.d/radsecproxy ]; then
> rm /etc/init.d/radsecproxy
> fi
> fi
You need to clean up because it's a conffile so it won't disappear on
upgrade; dpkg has helpers and you don't need to write code in postinst,
for example see
https://salsa.debian.org/debian/socklog/-/commit/502a8cd4edf2679505493af0b7a817f9d10f0d85
but consider that, for a sysvinit user, this will
remove the script even if it's customized, which is unexpected on
upgrade (it usually only happens on purge), so I suggest you drop
a warning in NEWS file so that users who care have the chance to do a
backup.
Best,
Lorenzo
>
> in my postinst?
>
> Grüße,
> Sven!
>
More information about the Debian-init-diversity
mailing list