The network tests need systemd when they use systemd-networkd for
networking. The tests will fail with:
```
dracut[E]: Module 'systemd-networkd' depends on module 'systemd', which can't be installed
```
This reverts commit
30894ad4855018f6ec07664ce06bf5557d65e324.
test_setup() {
call_dracut --tmpdir "$TESTDIR" \
- --add-confdir test-root --omit systemd \
+ --add-confdir test-root \
-a "$USE_NETWORK url-lib nfs" \
-I "ip grep setsid" \
-f "$TESTDIR"/initramfs.root || return 1
# Create what will eventually be the server root filesystem onto an overlay
call_dracut --tmpdir "$TESTDIR"/server/overlay \
- --add-confdir test-root --omit systemd \
+ --add-confdir test-root \
-a "bash $USE_NETWORK nfs" \
--add-drivers "nfsd sunrpc lockd" \
-I "exportfs pidof rpc.nfsd rpc.mountd dhcpd" \
# Create what will eventually be the server root filesystem onto an overlay
call_dracut --tmpdir "$TESTDIR" \
- --add-confdir test-root --omit systemd \
+ --add-confdir test-root \
-a "$USE_NETWORK" \
-d "iscsi_tcp crc32c ipv6" \
-I "modprobe chmod ip setsid pidof tgtd tgtadm /etc/passwd" \
rm -rf -- "$TESTDIR"/overlay
call_dracut --tmpdir "$TESTDIR" \
- --add-confdir test-root --omit systemd \
+ --add-confdir test-root \
-a "$USE_NETWORK iscsi" \
-d "iscsi_tcp crc32c ipv6 af_packet" \
-I "ip grep sleep setsid chmod modprobe pidof tgtd tgtadm" \
EOF
call_dracut --keep --tmpdir "$TESTDIR" \
- --add-confdir test-root --omit systemd \
+ --add-confdir test-root \
-a "$USE_NETWORK" \
-I "ip grep sleep nbd-server chmod modprobe pidof" \
--install-optional "/etc/netconfig dhcpd /etc/group /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/services /usr/etc/nsswitch.conf /usr/etc/rpc /usr/etc/protocols /usr/etc/services" \
fi
# Use systemd if available
- if [[ -e "$systemdutildir"/systemd ]] && ! [[ " $omit_dracutmodules " == *\ systemd\ * ]]; then
+ if [[ -e "$systemdutildir"/systemd ]]; then
deps+=" systemd systemd-journald"
fi