mirror of
https://git.proxmox.com/git/systemd
synced 2026-01-08 03:58:47 +00:00
This replaces commit 0b45b4c.
That's mostly dh-make boilerplate what doesn't provide any value.
31 lines
478 B
Bash
31 lines
478 B
Bash
#!/bin/sh -e
|
|
|
|
# adapted from postinst
|
|
chrooted() {
|
|
if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ];
|
|
then
|
|
return 1
|
|
fi
|
|
return 0
|
|
}
|
|
|
|
kill_udevd() {
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket
|
|
systemctl stop systemd-udevd.service
|
|
else
|
|
invoke-rc.d udev stop
|
|
fi
|
|
}
|
|
|
|
case "$1" in
|
|
remove)
|
|
if ! chrooted; then
|
|
kill_udevd
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|