Skip to content

Commit 3176bbb

Browse files
committed
Fix bug in shell condition
The shell code test ... || warn A; warn B will always print the warning for B despite the test result. This lead to the warning message "Settings from the kiwi description will be ignored" to be printed always. This commit fixes it with a clean if/then condition
1 parent c7d37f8 commit 3176bbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dracut/modules.d/90kiwi-repart/kiwi-repart-disk.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ function initialize {
1515
local profile=/.profile
1616
local partition_ids=/config.partids
1717

18-
test -f ${profile} || \
18+
if test ! -f ${profile}; then
1919
warn "No profile setup found"
2020
warn "Settings from the kiwi description will be ignored"
21+
fi
2122

2223
test -f ${profile} && import_file ${profile}
2324

0 commit comments

Comments
 (0)