PREIN
/bin/sh
getent group sanlock > /dev/null || /usr/sbin/groupadd \
-g 179 sanlock
getent passwd sanlock > /dev/null || /usr/sbin/useradd \
-u 179 -c "sanlock" -s /sbin/nologin -r \
-g 179 -d /var/run/sanlock sanlock
/usr/sbin/usermod -a -G disk sanlock
PREUN
/bin/sh
if [ $1 = 0 ]; then
/bin/systemctl --no-reload sanlock.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload wdmd.service > /dev/null 2>&1 || :
/bin/systemctl stop sanlock.service > /dev/null 2>&1 || :
/bin/systemctl stop wdmd.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
POSTUN
/bin/sh
if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart sanlock.service >/dev/null 2>&1 || :
/bin/systemctl try-restart wdmd.service >/dev/null 2>&1 || :
fi