mirror of
https://git.proxmox.com/git/systemd
synced 2026-01-20 22:02:36 +00:00
34 lines
500 B
Bash
34 lines
500 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() {
|
|
start-stop-daemon --stop --name systemd-udevd --user root --oknodo --quiet --retry 5
|
|
}
|
|
|
|
case "$1" in
|
|
remove|deconfigure|failed-upgrade)
|
|
if ! chrooted; then
|
|
kill_udevd
|
|
fi
|
|
;;
|
|
|
|
upgrade)
|
|
;;
|
|
|
|
*)
|
|
echo "$0 called with unknown argument '$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|