mirror of
https://git.proxmox.com/git/systemd
synced 2025-08-14 02:41:13 +00:00

Upstream commit hooks don't allow empty lines and of course they serve no purpose. Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
32 lines
482 B
Bash
32 lines
482 B
Bash
#!/bin/sh
|
|
|
|
set -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#
|