Score:0

What is the correct target name to run command script before stopping local file system pre?

ar flag

I need to run a command (writeback dmsetup flush) when OS shutdown before stopping local file system pre (mounted disk partitions) thus being possible correctly flush writeback cache.

In moment using the service below

[Unit]
Description=Flush
DefaultDependencies=no
Before=umount.target

[Service]
Type=oneshot
User=root
Group=root
ExecStart=/usr/local/bin/flush.sh
TimeoutStartSec=0

[Install]
WantedBy=umount.target

The command run before unmount.target being after stopping local-fs-pre.target when alll disk partitions are unmounted. Shutdown.target and reboot.target not work for it. Adding local-fs-pre.target will run the command when OS is starting not being correct.

Thanks for reply.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.