systemd/debian/udev.prerm
Michael Biebl ea089f29bb Stop testing for unknown arguments in udev maintainer scripts
This replaces commit 0b45b4c.
That's mostly dh-make boilerplate what doesn't provide any value.
2015-12-10 15:58:53 +01:00

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#