Subnets served per interface, pools, reservations, options at three levels, leases in SQLite saved before the ACK, ping and decline conflict checks, validated changes with history and undo, users and tokens, an audit log, a Kea importer, a sandboxed systemd unit and Debian packages. Tested with real udhcpc and dhcpcd clients in Docker (scripts/e2e.sh). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
917 B
Bash
Executable File
36 lines
917 B
Bash
Executable File
#!/bin/sh
|
|
# Steward: runs after the package's files are removed.
|
|
set -e
|
|
|
|
case "$1" in
|
|
remove|purge)
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl daemon-reload || true
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
# The backup timer's enabled state (see postinst): masked while the
|
|
# package is removed, forgotten on purge.
|
|
if command -v deb-systemd-helper >/dev/null 2>&1; then
|
|
case "$1" in
|
|
remove)
|
|
deb-systemd-helper mask steward-backup.timer >/dev/null || true
|
|
;;
|
|
purge)
|
|
deb-systemd-helper purge steward-backup.timer >/dev/null || true
|
|
deb-systemd-helper unmask steward-backup.timer >/dev/null || true
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# Even a purge keeps Steward's data: the database in /var/lib/steward holds
|
|
# the configuration and the leases. Remove it by hand when you no longer
|
|
# need it.
|
|
if [ "$1" = purge ]; then
|
|
echo "steward: kept /etc/steward, /var/lib/steward and /var/backups/steward;"
|
|
echo "remove them by hand if unused."
|
|
fi
|
|
|
|
exit 0
|