The gnome-ostree build system generates dracut initramfs images on the
build server, therefore not in hostonly mode. The build system at the
moment doesn't mount /sys, and the previous commit caused a hard
failure due to lack of /sys/devices.
Because we only want /sys/devices in hostonly mode, just move those
bits inside the hostonly conditional above.
done < /etc/fstab
done < /proc/swaps
fi
+ # record all host modaliases
+ declare -A host_modalias
+ find /sys/devices/ -name modalias -print > "$initdir/.modalias"
+ while read m; do
+ host_modalias["$(<"$m")"]=1
+ done < "$initdir/.modalias"
+ rm -f -- "$initdir/.modalias"
+
+ # check /proc/modules
+ declare -A host_modules
+ while read m rest; do
+ host_modules["$m"]=1
+ done </proc/modules
fi
-# record all host modaliases
-declare -A host_modalias
-find /sys/devices/ -name modalias -print > "$initdir/.modalias"
- while read m; do
- host_modalias["$(<"$m")"]=1
-done < "$initdir/.modalias"
-rm -f -- "$initdir/.modalias"
-
-# check /proc/modules
-declare -A host_modules
-while read m rest; do
- host_modules["$m"]=1
-done </proc/modules
-
unset m
unset rest