rewrite scripts
try to provide better syntax and avoid using bash
This commit is contained in:
15
debian/hyperv-daemons.postinst
vendored
15
debian/hyperv-daemons.postinst
vendored
@@ -1,9 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
if [ -d /run/systemd/system ]; then
|
||||
if [ -z "$2" ]; then
|
||||
have_systemd=1
|
||||
[ -d /run/systemd/system ] || have_systemd=0
|
||||
|
||||
case "$1" in
|
||||
configure )
|
||||
if [ ${have_systemd} = 1 ] ; then
|
||||
if [ -z "$2" ] ; then
|
||||
# On initial install make sure udev notifies systemd
|
||||
udevadm trigger || true
|
||||
else
|
||||
@@ -11,7 +15,10 @@ if [ "$1" = "configure" ]; then
|
||||
systemctl try-restart hv-kvp-daemon.service hv-vss-daemon.service
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
unset have_systemd
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
Reference in New Issue
Block a user