]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: a couple of assorted cleanups 27933/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 5 Jun 2023 20:41:46 +0000 (22:41 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 5 Jun 2023 21:30:01 +0000 (23:30 +0200)
- sort binaries
- send stdout/stderr of the autorelabel service to console as well

test/TEST-06-SELINUX/test.sh
test/test-functions
test/units/autorelabel.service

index 85be3bed9b6f7bf726768a9a93c34b6c646e2d72..340c74ef163bb5b60ca42cfa78894f4333df6cc8 100755 (executable)
@@ -43,9 +43,8 @@ test_append_files() {
 
     mkdir "$workspace/systemd-test-module"
     cp -v systemd_test.* "$workspace/systemd-test-module/"
+    image_install checkmodule load_policy m4 make sefcontext_compile semodule semodule_package runcon
     image_install -o sesearch
-    image_install runcon
-    image_install checkmodule semodule semodule_package m4 make load_policy sefcontext_compile
     image_install -o /usr/libexec/selinux/hll/pp # Fedora/RHEL/...
     image_install -o /usr/lib/selinux/hll/pp     # Debian/Ubuntu/...
 
index c7f9f2f4404c1c4375fdf47dfa7dd655d3b316ad..8e26910bcd85e61db7535857335eb3bd9c5a79f1 100644 (file)
@@ -798,7 +798,7 @@ setup_selinux() {
     fi
 
     local conf_dir=/etc/selinux
-    local fixfiles_tools=(awk bash cat chcon expr find grep head secon setfiles rm sort uname uniq)
+    local fixfiles_tools=(awk bash cat chcon expr egrep find grep head secon setfiles rm sort uname uniq)
 
     # Make sure the following statement can't expand to "/" to prevent
     # a potential where-are-my-backups situation
index 1da1002cde800864408a5c660b9d4e0c1e77d442..aad7d111d5ac92e5c7dfa0785f0e4cf42dd5167d 100644 (file)
@@ -10,10 +10,11 @@ ConditionSecurity=selinux
 ConditionPathExists=|/.autorelabel
 
 [Service]
-ExecStart=sh -x -c 'echo 0 >/sys/fs/selinux/enforce && fixfiles -f -F relabel && rm /.autorelabel && systemctl --force reboot'
+ExecStart=sh -xec 'echo 0 >/sys/fs/selinux/enforce; fixfiles -f -F relabel; rm /.autorelabel; systemctl --force reboot'
 Type=oneshot
 TimeoutSec=0
 RemainAfterExit=yes
+StandardOutput=journal+console
 
 [Install]
 WantedBy=basic.target