From 2cb7e0aaedad73b076ea18c6900b0e86c5760d79 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 15:00:47 +0200 Subject: Adding upstream version 247.3. Signed-off-by: Daniel Baumann --- test/test-path/basic.target | 22 ++++++++++++++++++++++ test/test-path/path-changed.path | 8 ++++++++ test/test-path/path-changed.service | 7 +++++++ test/test-path/path-directorynotempty.path | 8 ++++++++ test/test-path/path-directorynotempty.service | 7 +++++++ test/test-path/path-exists.path | 8 ++++++++ test/test-path/path-exists.service | 7 +++++++ test/test-path/path-existsglob.path | 8 ++++++++ test/test-path/path-existsglob.service | 7 +++++++ test/test-path/path-makedirectory.path | 10 ++++++++++ test/test-path/path-makedirectory.service | 7 +++++++ test/test-path/path-modified.path | 8 ++++++++ test/test-path/path-modified.service | 7 +++++++ test/test-path/path-mycustomunit.service | 7 +++++++ test/test-path/path-unit.path | 9 +++++++++ test/test-path/paths.target | 12 ++++++++++++ test/test-path/sysinit.target | 15 +++++++++++++++ 17 files changed, 157 insertions(+) create mode 100644 test/test-path/basic.target create mode 100644 test/test-path/path-changed.path create mode 100644 test/test-path/path-changed.service create mode 100644 test/test-path/path-directorynotempty.path create mode 100644 test/test-path/path-directorynotempty.service create mode 100644 test/test-path/path-exists.path create mode 100644 test/test-path/path-exists.service create mode 100644 test/test-path/path-existsglob.path create mode 100644 test/test-path/path-existsglob.service create mode 100644 test/test-path/path-makedirectory.path create mode 100644 test/test-path/path-makedirectory.service create mode 100644 test/test-path/path-modified.path create mode 100644 test/test-path/path-modified.service create mode 100644 test/test-path/path-mycustomunit.service create mode 100644 test/test-path/path-unit.path create mode 100644 test/test-path/paths.target create mode 100644 test/test-path/sysinit.target (limited to 'test/test-path') diff --git a/test/test-path/basic.target b/test/test-path/basic.target new file mode 100644 index 0000000..d8cdd5a --- /dev/null +++ b/test/test-path/basic.target @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Basic System +Documentation=man:systemd.special(7) +Requires=sysinit.target +Wants=sockets.target timers.target paths.target slices.target +After=sysinit.target sockets.target paths.target slices.target tmp.mount + +# We support /var, /tmp, /var/tmp, being on NFS, but we don't pull in +# remote-fs.target by default, hence pull them in explicitly here. Note that we +# require /var and /var/tmp, but only add a Wants= type dependency on /tmp, as +# we support that unit being masked, and this should not be considered an error. +RequiresMountsFor=/var /var/tmp +Wants=tmp.mount diff --git a/test/test-path/path-changed.path b/test/test-path/path-changed.path new file mode 100644 index 0000000..e58bdd9 --- /dev/null +++ b/test/test-path/path-changed.path @@ -0,0 +1,8 @@ +[Unit] +Description=Test PathChanged + +[Path] +PathChanged=/tmp/test-path_changed + +[Install] +WantedBy=multi-user.target diff --git a/test/test-path/path-changed.service b/test/test-path/path-changed.service new file mode 100644 index 0000000..1246ec2 --- /dev/null +++ b/test/test-path/path-changed.service @@ -0,0 +1,7 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=sleep infinity +Type=exec +RemainAfterExit=true diff --git a/test/test-path/path-directorynotempty.path b/test/test-path/path-directorynotempty.path new file mode 100644 index 0000000..17e599f --- /dev/null +++ b/test/test-path/path-directorynotempty.path @@ -0,0 +1,8 @@ +[Unit] +Description=Test DirectoryNotEmpty + +[Path] +DirectoryNotEmpty=/tmp/test-path_directorynotempty/ + +[Install] +WantedBy=multi-user.target diff --git a/test/test-path/path-directorynotempty.service b/test/test-path/path-directorynotempty.service new file mode 100644 index 0000000..1246ec2 --- /dev/null +++ b/test/test-path/path-directorynotempty.service @@ -0,0 +1,7 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=sleep infinity +Type=exec +RemainAfterExit=true diff --git a/test/test-path/path-exists.path b/test/test-path/path-exists.path new file mode 100644 index 0000000..c4c9105 --- /dev/null +++ b/test/test-path/path-exists.path @@ -0,0 +1,8 @@ +[Unit] +Description=Test PathExists + +[Path] +PathExists=/tmp/test-path_exists + +[Install] +WantedBy=multi-user.target diff --git a/test/test-path/path-exists.service b/test/test-path/path-exists.service new file mode 100644 index 0000000..1246ec2 --- /dev/null +++ b/test/test-path/path-exists.service @@ -0,0 +1,7 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=sleep infinity +Type=exec +RemainAfterExit=true diff --git a/test/test-path/path-existsglob.path b/test/test-path/path-existsglob.path new file mode 100644 index 0000000..a058599 --- /dev/null +++ b/test/test-path/path-existsglob.path @@ -0,0 +1,8 @@ +[Unit] +Description=Test PathExistsGlob + +[Path] +PathExistsGlob=/tmp/test-path_existsglob* + +[Install] +WantedBy=multi-user.target diff --git a/test/test-path/path-existsglob.service b/test/test-path/path-existsglob.service new file mode 100644 index 0000000..1246ec2 --- /dev/null +++ b/test/test-path/path-existsglob.service @@ -0,0 +1,7 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=sleep infinity +Type=exec +RemainAfterExit=true diff --git a/test/test-path/path-makedirectory.path b/test/test-path/path-makedirectory.path new file mode 100644 index 0000000..9408479 --- /dev/null +++ b/test/test-path/path-makedirectory.path @@ -0,0 +1,10 @@ +[Unit] +Description=Test MakeDirectory & DirectoryMode + +[Path] +DirectoryNotEmpty=/tmp/test-path_makedirectory/ +MakeDirectory=yes +DirectoryMode=0744 + +[Install] +WantedBy=multi-user.target diff --git a/test/test-path/path-makedirectory.service b/test/test-path/path-makedirectory.service new file mode 100644 index 0000000..1246ec2 --- /dev/null +++ b/test/test-path/path-makedirectory.service @@ -0,0 +1,7 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=sleep infinity +Type=exec +RemainAfterExit=true diff --git a/test/test-path/path-modified.path b/test/test-path/path-modified.path new file mode 100644 index 0000000..1836322 --- /dev/null +++ b/test/test-path/path-modified.path @@ -0,0 +1,8 @@ +[Unit] +Description=Test PathModified + +[Path] +PathModified=/tmp/test-path_modified + +[Install] +WantedBy=multi-user.target diff --git a/test/test-path/path-modified.service b/test/test-path/path-modified.service new file mode 100644 index 0000000..1246ec2 --- /dev/null +++ b/test/test-path/path-modified.service @@ -0,0 +1,7 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=sleep infinity +Type=exec +RemainAfterExit=true diff --git a/test/test-path/path-mycustomunit.service b/test/test-path/path-mycustomunit.service new file mode 100644 index 0000000..6a9bac0 --- /dev/null +++ b/test/test-path/path-mycustomunit.service @@ -0,0 +1,7 @@ +[Unit] +Description=Service Test Path Unit + +[Service] +ExecStart=sleep infinity +Type=exec +RemainAfterExit=true diff --git a/test/test-path/path-unit.path b/test/test-path/path-unit.path new file mode 100644 index 0000000..95e572d --- /dev/null +++ b/test/test-path/path-unit.path @@ -0,0 +1,9 @@ +[Unit] +Description=Test Path Unit= + +[Path] +PathExists=/tmp/test-path_unit +Unit=path-mycustomunit.service + +[Install] +WantedBy=multi-user.target diff --git a/test/test-path/paths.target b/test/test-path/paths.target new file mode 100644 index 0000000..1bec148 --- /dev/null +++ b/test/test-path/paths.target @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Paths +Documentation=man:systemd.special(7) diff --git a/test/test-path/sysinit.target b/test/test-path/sysinit.target new file mode 100644 index 0000000..eed3d16 --- /dev/null +++ b/test/test-path/sysinit.target @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=System Initialization +Documentation=man:systemd.special(7) +Conflicts=emergency.service emergency.target +Wants=local-fs.target swap.target +After=local-fs.target swap.target emergency.service emergency.target -- cgit v1.2.3