mirror of
https://git.proxmox.com/git/mirror_spl-debian
synced 2025-08-16 22:54:15 +00:00

There are packages distributed with /etc/hostid file installed as conffile, which is going to cause problem when the package is purged. Here we detect such case and migrate it to an ordinary file that preserves during purge. Also replace the endianness detection code to use od(1) from coreutils instead of requiring gcc
11 lines
314 B
Bash
11 lines
314 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Detect if /etc/hostid is a conffile of previous spl package, migrate if yes
|
|
# hostid file should preserve even when package is purged
|
|
if $(dpkg-query --showformat='${Conffiles}\n' --show spl >/dev/null 2>&1); then
|
|
dpkg-maintscript-helper rm_conffile /etc/hostid -- "$@"
|
|
fi
|
|
|
|
#DEBHELPER#
|