systemd: update templates

This commit is contained in:
Thomas Schoebel-Theuer 2019-03-01 22:41:16 +01:00 committed by Thomas Schoebel-Theuer
parent b9f85276dd
commit 96b13a2b10
5 changed files with 28 additions and 18 deletions

View File

@ -0,0 +1,18 @@
@eval{%let{mount}{%subst{%{unit}}{-}{/}}}
[Unit]
Description=MARS local mount on /@{mount}/@{res}
Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
Requires=mars.service
After=mars.service
ConditionPathIsSymbolicLink=/mars/resource-@{res}/systemd-want
ConditionPathExists=/mars/resource-@{res}/userspace/systemd-want-@{host}
ConditionPathExists=/dev/mars/@{res}
ConditionPathIsDirectory=/@{mount}/@{res}
[Mount]
What=/dev/mars/@{res}
Where=/@{mount}/@{res}
[Install]
WantedBy=mars.service

View File

@ -1,9 +1,12 @@
[Unit]
Description=MARS auto-activation of primary device /dev/mars/@{res}
#Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
Requires=mars.service
After=mars.service
[Path]
PathExists=/dev/mars/@{res}
Unit=vol-@escvar{res}.mount
Unit=mnt-test-@escvar{res}.mount
[Install]
WantedBy=mars.service

View File

@ -5,3 +5,6 @@ Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
[Path]
PathExists=/mars/uuid
Unit=mars.service
[Install]
WantedBy=mars.service

View File

@ -5,6 +5,8 @@ RequiresMountsFor=/mars/uuid
StopWhenUnneeded=false
IgnoreOnIsolate=true
ConditionPathIsSymbolicLink=/mars/uuid
[Service]
Type=oneshot
RemainAfterExit=yes

View File

@ -1,16 +0,0 @@
[Unit]
Description=MARS local mount on /vol/@{res}
#Documentation=https://github.com/schoebel/mars/docu/mars-manual.pdf
Requires=mars.service
After=mars.service
ConditionPathIsSymbolicLink=/mars/resource-@{res}/systemd-want
ConditionPathExists=/dev/mars/@{res}
ConditionPathIsDirectory=/vol/@{res}
[Mount]
What=/dev/mars/@{res}
Where=/vol/@{res}
[Install]
WantedBy=mars.service