]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: if haveged is part of initrd it needs to be installed in the image too 20436/head
authorFranck Bui <fbui@suse.com>
Fri, 6 Aug 2021 14:47:32 +0000 (16:47 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 18 Aug 2021 15:37:55 +0000 (17:37 +0200)
Otherwise haveged won't survive when switching root from initrd to host making
haveged service in host fail.

test/test-functions

index 8b8c89a20628c2736666ba810f300f7467238b30..fc5453027159bf95cb3e4a1bef3c59b789121ac7 100644 (file)
@@ -664,6 +664,7 @@ setup_basic_environment() {
     install_fs_tools
     install_modules
     install_plymouth
+    install_haveged
     install_debug_tools
     install_ld_so_conf
     install_testuser
@@ -1426,6 +1427,16 @@ install_plymouth() {
     # fi
 }
 
+install_haveged() {
+    # If haveged is installed and probably included in initrd, it needs to be
+    # installed in the image too.
+    if [ -x /usr/sbin/haveged ]; then
+        dinfo "Install haveged files"
+        inst /usr/sbin/haveged
+        inst /usr/lib/systemd/system/haveged.service
+    fi
+}
+
 install_ld_so_conf() {
     dinfo "Install /etc/ld.so.conf*"
     cp -a /etc/ld.so.conf* "${initdir:?}/etc"