From: Harald Hoyer Date: Tue, 4 May 2021 09:49:34 +0000 (+0200) Subject: test(FULL SYSTEMD): try pacman rather than rpm on Arch X-Git-Tag: 054~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ece67c7e2d3459a1054a1af46d17906d77c72fc0;p=thirdparty%2Fdracut.git test(FULL SYSTEMD): try pacman rather than rpm on Arch If there is no `rpm`, try `pacman` to get a full list of systemd files to install into the real test root. --- diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh index 8919c9855..505240c12 100755 --- a/test/TEST-04-FULL-SYSTEMD/test.sh +++ b/test/TEST-04-FULL-SYSTEMD/test.sh @@ -80,7 +80,16 @@ test_setup() { inst_multiple -o ${_terminfodir}/l/linux inst_multiple grep inst_simple ./fstab /etc/fstab - rpm -ql systemd | xargs -r "$DRACUT_INSTALL" ${initdir:+-D "$initdir"} -o -a -l + if type -P rpm &> /dev/null; then + rpm -ql systemd | xargs -r "$DRACUT_INSTALL" ${initdir:+-D "$initdir"} -o -a -l + elif type -P pacman &> /dev/null; then + pacman -Q -l systemd | while read -r _ a; do printf -- "%s\0" "$a"; done | xargs -0 -r "$DRACUT_INSTALL" ${initdir:+-D "$initdir"} -o -a -l + rm "$initdir"/usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service + else + echo "Can't install systemd base" + return 1 + fi + inst /sbin/init inst /lib/systemd/system/systemd-remount-fs.service inst /lib/systemd/systemd-remount-fs inst /lib/systemd/system/systemd-journal-flush.service @@ -141,13 +150,7 @@ EOF ln -fs ../testsuite.service "$initdir"/etc/systemd/system/testsuite.target.wants/testsuite.service # make the testsuite the default target - ln -fs testsuite.target "$initdir"/etc/systemd/system/default.target - - # mkdir -p $initdir/etc/rc.d - # cat >$initdir/etc/rc.d/rc.local <