what is the best way to place a shellscript which is called as soon as possible before shutdown/reboot happens?
in my case for VMware-Workstation to suspend possibly in the background running virtual machines since systemd vreaks the logic of the the /etc/init.d/vmware
important is that the system must wait until this script is really finished what can take some minutes
/lib/systemd/system-shutdown /lib/systemd/systemd-shutdown /lib/systemd/systemd-shutdownd /lib/systemd/system/canberra-system-shutdown-reboot.service /lib/systemd/system/canberra-system-shutdown.service /lib/systemd/system/shutdown.target /lib/systemd/system/shutdown.target.wants /lib/systemd/system/systemd-shutdownd.service /lib/systemd/system/systemd-shutdownd.socket /lib/systemd/system/systemd-update-utmp-shutdown.service /lib/systemd/system/shutdown.target.wants/alsa-store.service /lib/systemd/system/shutdown.target.wants/hwclock-save.service /lib/systemd/system/shutdown.target.wants/systemd-random-seed-save.service /lib/systemd/system/shutdown.target.wants/systemd-update-utmp-shutdown.service /lib/systemd/system/sockets.target.wants/systemd-shutdownd.socket