mirror of
https://github.com/kairos-io/immucore.git
synced 2025-08-02 06:52:03 +00:00
Fix dracut service install
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
This commit is contained in:
parent
66aa6627f7
commit
14e0faacee
@ -78,7 +78,7 @@ build-dracut:
|
||||
RUN rm /etc/dracut.conf.d/02-cos-immutable-rootfs.conf
|
||||
END
|
||||
RUN kernel=$(ls /lib/modules | head -n1) && \
|
||||
dracut -f "/boot/initrd-${kernel}" "${kernel}" && \
|
||||
dracut -v -f "/boot/initrd-${kernel}" "${kernel}" && \
|
||||
ln -sf "initrd-${kernel}" /boot/initrd
|
||||
ARG INITRD=$(readlink -f /boot/initrd)
|
||||
SAVE ARTIFACT $INITRD Initrd AS LOCAL build/initrd-$VERSION
|
||||
|
@ -7,8 +7,6 @@ GENERATOR_DIR="$2"
|
||||
[ -z "$GENERATOR_DIR" ] && exit 1
|
||||
[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR"
|
||||
|
||||
oem_label=$(getarg rd.cos.oemlabel=)
|
||||
|
||||
# See https://github.com/kairos-io/packages/blob/d12b12b043a71d8471454f7b4fc84c3181d2bf60/packages/system/dracut/immutable-rootfs/30cos-immutable-rootfs/cos-generator.sh#L29
|
||||
{
|
||||
echo "[Unit]"
|
||||
@ -16,18 +14,6 @@ oem_label=$(getarg rd.cos.oemlabel=)
|
||||
echo "Before=initrd-fs.target"
|
||||
echo "Conflicts=initrd-switch-root.target"
|
||||
echo "Requires=initrd-root-fs.target"
|
||||
if getargbool 0 rd.neednet; then
|
||||
echo "Wants=network-online.target"
|
||||
echo "After=network-online.target"
|
||||
echo "Description=immucore online mount"
|
||||
else
|
||||
echo "Description=immucore mount"
|
||||
fi
|
||||
# Itxaka: oem is mounted by immucore?
|
||||
# OEM is special as immucore plugins might need that in order to unlock other partitions and plugins can reside in /oem as well and immucore needs to find them
|
||||
#if [ -n "${oem_label}" ]; then
|
||||
# echo "After=oem.mount"
|
||||
#fi
|
||||
echo "After=initrd-root-fs.target cos-setup-rootfs.service"
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
|
@ -23,18 +23,9 @@ install() {
|
||||
declare moddir=${moddir}
|
||||
declare systemdutildir=${systemdutildir}
|
||||
declare systemdsystemunitdir=${systemdsystemunitdir}
|
||||
declare initdir="${initdir}"
|
||||
|
||||
# Add missing elemental binary, drop once we get yip lib inside immucore as its only needed to run the stages
|
||||
inst_multiple \
|
||||
immucore elemental
|
||||
|
||||
inst_script "${moddir}/generator.sh" \
|
||||
"${systemdutildir}/system-generators/immucore-generator"
|
||||
|
||||
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd-fs.target.requires"
|
||||
ln_r "../immucore.service" \
|
||||
"${systemdsystemunitdir}/initrd-fs.target.requires/immucore.service"
|
||||
|
||||
inst_multiple immucore elemental
|
||||
inst_script "${moddir}/generator.sh" "${systemdutildir}/system-generators/immucore-generator"
|
||||
dracut_need_initqueue
|
||||
}
|
Loading…
Reference in New Issue
Block a user