With the old good SystemV scripts, if I want something before shutdown, I put a script like this in /etc/rc0.d/
K400rc.local.shutdown.sh
And I edit it and put my commands which I want to run before shutdown. On linux with systemd I have created a "manifest" like this
vim /lib/systemd/system/rc-local-shutdown.service
[Unit]
Description=/etc/rc.local.shutdown Compatibility
ConditionFileIsExecutable=/etc/rc.local.shutdown
DefaultDependencies=no
After=rc-local.service basic.target
Before=shutdown.target reboot.target
[Service]
Type=oneshot
ExecStart=/etc/rc.local.shutdown
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=shutdown.target
Works very good..and before shutdown I can put my commands. The question is..someone know how to do a manifest like this with Solaris smf? I know how to do a rc.local but not to do a rc.local.shutdown manifest. Someone know?