31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
|
|
From 44a3d151910e89c8e7337f32091b3581c84d6b32 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Yuhang Wei <weiyuhang3@huawei.com>
|
||
|
|
Date: Wed, 11 Dec 2024 11:28:00 +0800
|
||
|
|
Subject: [PATCH 2/3] fix(kbimg): incorrect remove chroot script path
|
||
|
|
|
||
|
|
Signed-off-by: Yuhang Wei <weiyuhang3@huawei.com>
|
||
|
|
---
|
||
|
|
KubeOS-Rust/kbimg/src/custom.rs | 6 +++++-
|
||
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/KubeOS-Rust/kbimg/src/custom.rs b/KubeOS-Rust/kbimg/src/custom.rs
|
||
|
|
index 55071bfa..85d10023 100644
|
||
|
|
--- a/KubeOS-Rust/kbimg/src/custom.rs
|
||
|
|
+++ b/KubeOS-Rust/kbimg/src/custom.rs
|
||
|
|
@@ -78,7 +78,11 @@ impl ChrootScript {
|
||
|
|
"#,
|
||
|
|
absolute_path.as_path().to_str().unwrap(),
|
||
|
|
script_name.to_str().unwrap(),
|
||
|
|
- if self.rm.unwrap_or(false) { format!("rm -f /{}", script_name.to_str().unwrap()) } else { "".to_string() }
|
||
|
|
+ if self.rm.unwrap_or(false) {
|
||
|
|
+ format!("rm -f \"${{RPM_ROOT}}\"/{}", script_name.to_str().unwrap())
|
||
|
|
+ } else {
|
||
|
|
+ "".to_string()
|
||
|
|
+ }
|
||
|
|
)?;
|
||
|
|
Ok(())
|
||
|
|
}
|
||
|
|
--
|
||
|
|
2.39.5 (Apple Git-154)
|
||
|
|
|