blob: d25135f635eb871eccab9bcb5551da5160c6e773 (
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
30
31
|
#!/bin/sh
if [ "$PKG_NAME" = "nut" ]; then
exit 0
fi
EXEC="${PKG_NAME#nut-}"
case "$EXEC" in
common | upsmon-sendmail-notify | avahi-service)
exit 0
;;
driver-*)
DRIVER="${EXEC#driver-}"
/usr/libexec/nut/"$DRIVER" -V 2>&1 | grep -F "${PKG_VERSION}"
;;
server)
"upsd" -V 2>&1 | grep -F "${PKG_VERSION}" && "upsdrvctl" -V 2>&1 | grep -F "${PKG_VERSION}"
;;
upssched)
# Only intended to be run from upsmon
exit 0
;;
web-cgi)
# Only runs as CGI scripts
exit 0
;;
*)
"$EXEC" -V 2>&1 | grep -F "${PKG_VERSION}"
;;
esac
|