Am 28.04.20 um 13:38 schrieb Jonathan Buzzard:
Yuck, and double yuck. There are many things you can say about systemd
(and I have a choice few) but one of them is that it makes this sort of
hackery obsolete. At least that is one of it goals.

A systemd way to do it would be via one or more helper units. So lets
assume your GPFS file system is mounted on /gpfs, then create a file
called ismounted.txt on it and then create a unit called say
gpfs_mounted.target that looks like


# gpfs_mounted.target
[Unit]
TimeoutStartSec=infinity
ConditionPathExists=/gpfs/ismounted.txt
ExecStart=/usr/bin/sleep 10
RemainAfterExit=yes

Then the main unit gets

Wants=gpfs_mounted.target
After=gpfs_mounted.target

If you are using scripts in systemd you are almost certainly doing it
wrong :-)

Yes, that the right direction. But still not the way I'd like it to be. First, I don't really like the flag file stuff. Imagine the mess you'd create if multiple services would require flag files...

Second, I am looking for an all_local target. That one cannot be solved using this approach, right? (same for all_remote or all)

Uli

--
Science + Computing AG
Vorstandsvorsitzender/Chairman of the board of management:
Dr. Martin Matzke
Vorstand/Board of Management:
Matthias Schempp, Sabine Hohenstein
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Aufsichtsrat/Supervisory Board:
Martin Wibbe, Ursula Morgenstern
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
_______________________________________________
gpfsug-discuss mailing list
gpfsug-discuss at spectrumscale.org
http://gpfsug.org/mailman/listinfo/gpfsug-discuss

Reply via email to