Commit 90b8fd49 authored by Michael Shigorin's avatar Michael Shigorin

80-make-initfs: fixed silly thinko

The added pdir check was a hillarious(tm) overlooked bug indeed: I tried to put .../initfs/initfs instead of .../initfs as the result. Duly spotted by torabora@, thanks a lot. Still the kmod+propagator+kernel-image combo needed some tweaking too, see #27640
parent 944e0341
#!/bin/sh -efu
#!/bin/sh -efux
# NB: /etc/initrd.mk carefully prepared by earlier scripts
verbose() { [ -n "$GLOBAL_VERBOSE" ] && echo "** 80-make-initfs: $@" >&2; }
kver="$(rpm -qa 'kernel-image*' \
--qf '%{installtime} %{version}-%{name}-%{release}\n' \
| sort -n \
......@@ -12,14 +14,20 @@ MAKE_INITRD_OPTS="--no-checks -k $kver"
MAKE_INITRD_VER="`make-initrd -V \
| sed -rn 's/^make-initrd version ([0-9.]+)/\1/p'`"
# make-initrd >= 0.7.8
if [ "`rpmvercmp "$MAKE_INITRD_VER" "0.7.8"`" != "-1" ]; then
MAKE_INITRD_OPTS="$MAKE_INITRD_OPTS --no-depmod"
fi
[ -z "$GLOBAL_VERBOSE" ] || MAKE_INITRD_OPTS="$MAKE_INITRD_OPTS -v"
if make-initrd $MAKE_INITRD_OPTS; then
pdir="$(getconf LIBDIR)/propagator/initfs"
pdir="$(getconf LIBDIR)/propagator"
if [ -d "$pdir" ]; then # p5/t6
verbose "$pdir exists"
gzip < /boot/initrd-$kver.img > "$pdir"/initfs
else
verbose "$pdir missing, no-op"
fi
else
exit 1
......@@ -27,3 +35,4 @@ fi
[ -h /boot/vmlinuz ] || ln -s vmlinuz-$kver /boot/vmlinuz
[ -h /boot/initrd.img ] || ln -s initrd-$kver.img /boot/initrd.img
:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment