1 Star 0 Fork 48

geliwei/systemd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0964-test-TEST-15-remove-all-created-unit-files.patch 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
Zhao Hang 提交于 2023-12-26 10:07 . update to systemd-239-78.src.rpm
From eaffd717ec05ced564fc67b880f07640a8d60816 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 21 Mar 2020 16:30:27 +0100
Subject: [PATCH] test/TEST-15: remove all created unit files
We would miss anything created under a template instance.
(cherry picked from commit 4e2ac45a83e5495a5c1d3ecac62a054e0cef7746)
Related: #2156620
---
test/TEST-15-DROPIN/test-dropin.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/TEST-15-DROPIN/test-dropin.sh b/test/TEST-15-DROPIN/test-dropin.sh
index 64d8a98fc7..30f1e84954 100755
--- a/test/TEST-15-DROPIN/test-dropin.sh
+++ b/test/TEST-15-DROPIN/test-dropin.sh
@@ -8,6 +8,12 @@ _clear_service () {
rm -f /{etc,run,usr/lib}/systemd/system/$1.service
rm -fr /{etc,run,usr/lib}/systemd/system/$1.service.d
rm -fr /{etc,run,usr/lib}/systemd/system/$1.service.{wants,requires}
+ if [[ $1 == *@ ]]; then
+ systemctl stop $1*.service 2>/dev/null || :
+ rm -f /{etc,run,usr/lib}/systemd/system/$1*.service
+ rm -fr /{etc,run,usr/lib}/systemd/system/$1*.service.d
+ rm -fr /{etc,run,usr/lib}/systemd/system/$1*.service.{wants,requires}
+ fi
}
clear_services () {
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/geliwei/systemd.git
git@gitee.com:geliwei/systemd.git
geliwei
systemd
systemd
a8

搜索帮助