1
0

rewrite scripts

try to provide better syntax and avoid using bash
This commit is contained in:
2024-10-29 05:12:06 +03:00
parent 1e13062902
commit eb2bdc81cb
24 changed files with 363 additions and 247 deletions

View File

@@ -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#