Compare commits

...

1 commit

Author SHA1 Message Date
Félix Baylac-Jacqué 39302164be
wip 2021-01-10 16:10:32 +01:00
2 changed files with 8 additions and 1 deletions

View file

@ -4861,6 +4861,7 @@ int exec_context_destroy_runtime_directory(const ExecContext *c, const char *run
/* We execute this synchronously, since we need to be sure this is gone when we start the
* service next. */
// here
(void) rm_rf(p, REMOVE_ROOT);
}

View file

@ -4,6 +4,12 @@
set -ex
set -o pipefail
cat > /usr/bin/create-ro-statedir <<EOF
echo "Hello world" > $RUNTIME_DIRECTORY
/bin/sleep infinity
EOF
cat > /etc/systemd/system/testservice.service <<EOF
[Service]
ConfigurationDirectory=testservice
@ -12,7 +18,7 @@ StateDirectory=testservice
CacheDirectory=testservice
LogsDirectory=testservice
RuntimeDirectoryPreserve=yes
ExecStart=/bin/sleep infinity
ExecStart=sh -x -c 'touch $RUNTIME_DIRECTORY/ro-file && chmod 400 $RUNTIME_DIRECTORY/ro-file $ && /bin/sleep infinity'
Type=exec
EOF