Maybe /tmp is getting cleared or unmounted first? What happens if you put the script somewhere else?
On Mon, Aug 20, 2018, 6:48 PM Filipe Brandenburger <filbran...@google.com> wrote: > On Mon, Aug 20, 2018 at 4:00 PM Radoslaw Garbacz > <radoslaw.garb...@xtremedatainc.com> wrote: > > Could you please advise me with regard to systemd configuration for > service type=oneshot. > > It does not execute stop on shutdown/reboot, but works as intended when > called manually. > > I can't reproduce this, it works fine for me on reboot, according to > the journalctl logs below: > > $ journalctl -u xdctest > -- Logs begin at Mon 2018-08-20 23:39:33 UTC, end at Mon 2018-08-20 > 23:43:52 UTC. -- > Aug 20 23:39:45 centos7 systemd[1]: Starting ### service test ###... > Aug 20 23:39:45 centos7 aaa.sh[353]: BEGIN: TESTING systemd: start > Aug 20 23:40:04 centos7 aaa.sh[353]: END: TESTING systemd: start > Aug 20 23:40:04 centos7 systemd[1]: Started ### service test ###. > Aug 20 23:42:08 centos7 systemd[1]: Stopping ### service test ###... > Aug 20 23:42:08 centos7 aaa.sh[1225]: BEGIN: TESTING systemd: stop > Aug 20 23:42:28 centos7 aaa.sh[1225]: END: TESTING systemd: stop > Aug 20 23:42:28 centos7 systemd[1]: Stopped ### service test ###. > -- Reboot -- > Aug 20 23:42:44 centos7 systemd[1]: Starting ### service test ###... > Aug 20 23:42:44 centos7 aaa.sh[354]: BEGIN: TESTING systemd: start > Aug 20 23:43:03 centos7 aaa.sh[354]: END: TESTING systemd: start > Aug 20 23:43:03 centos7 systemd[1]: Started ### service test ###. > > Only difference from your reported setup is that I have the aaa.sh > script under /usr/local/bin/ and I only used > WantedBy=multi-user.target (and not default.target), but I believe > none of those should make a difference... > > Cheers, > Filipe > _______________________________________________ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/systemd-devel > -- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else https://refi64.com/
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel