/
niceSOFT
/
systemd
Обзор
Документация
Войти
/
niceSOFT
/
systemd
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/test-execute/exec-bindpaths.service
18 строк
727 B
Yu Watanabe
test: always use bash
07 дек 2025, 03:09
07 дек 2025, 03:09
b49a469
Код
Авторство
О чём код?
# SPDX-License-Identifier: LGPL-2.1-or-later [Unit] Description=Test for BindPaths= and BindReadOnlyPaths= [Service] Type=oneshot # Create a file in /tmp/test-exec-bindpaths ExecStart=touch /tmp/test-exec-bindpaths/thisisasimpletest # Then, the file can be access through /tmp ExecStart=test -f /tmp/thisisasimpletest # Also, through /tmp/test-exec-bindreadonlypaths ExecStart=test -f /tmp/test-exec-bindreadonlypaths/thisisasimpletest # The file cannot modify through /tmp/test-exec-bindreadonlypaths ExecStart=bash -x -c '! touch /tmp/test-exec-bindreadonlypaths/thisisasimpletest' # Cleanup ExecStart=rm /tmp/thisisasimpletest BindPaths=/tmp:/tmp/test-exec-bindpaths BindReadOnlyPaths=/tmp:/tmp/test-exec-bindreadonlypaths