blob: 96c22da8b2858a4368ea439dafccfb18ad2dfa7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
post_install() {
/usr/bin/systemd-sysusers ovirt-guest-agent.conf
/usr/bin/udevadm trigger --subsystem-match="virtio-ports" \
--attr-match="name=com.redhat.rhevm.vdsm"
/usr/bin/systemctl daemon-reload
}
pre_remove() {
/usr/bin/systemctl stop ovirt-guest-agent.service > /dev/null 2>&1
# Send an "uninstalled" notification to vdsm.
VIRTIO=`grep "^device" /etc/ovirt-guest-agent.conf | awk '{ print $3; }'`
if [ -w $VIRTIO ]
then
# Non blocking uninstalled notification
echo -e '{"__name__": "uninstalled"}\n' | dd of=$VIRTIO \
oflag=nonblock status=noxfer conv=nocreat 1>& /dev/null || :
fi
}
post_remove() {
/usr/bin/userdel ovirtagent > /dev/null
/usr/bin/systemctl daemon-reload
/usr/bin/udevadm trigger --subsystem-match="virtio-ports" \
--attr-match="name=com.redhat.rhevm.vdsm"
}
post_upgrade() {
/usr/bin/systemctl try-restart ovirt-guest-agent.service >/dev/null 2>&1 || :
}
|