kernel, tar2fs: do not create /boot/.origver

This commit is contained in:
Anton Midyukov 2019-07-20 22:43:59 +07:00 committed by Michael Shigorin
parent 938820acd9
commit 8e1dd12f8e
2 changed files with 5 additions and 6 deletions

View File

@ -217,11 +217,11 @@ pushd $ROOTFS/boot
get_label() { echo "${1# *}" | sed -r 's,.*elbrus-([0-9a-z]+)-.*$,\1,'; }
KVERSIONS=
if [ -s .origver ]; then
while read kver; do
KVERSIONS="$KVERSIONS $kver"
done < .origver
fi
KVERSIONS="$(chroot "$ROOTFS" rpm -qa 'kernel-image*' \
--qf '%{installtime} %{version}-%{name}-%{release}\n' \
| sort -n \
| cut -f 2 -d ' ' \
| sed 's/kernel-image-//')"
[ -n "$KVERSIONS" ] || fatal "unable to deduce kernel version"
rm -f .origver

View File

@ -11,7 +11,6 @@ kver="$(rpm -qa 'kernel-image*' \
[ -n "$kver" ] || { echo "** unable to deduce kernel version" >&2; exit 1; }
cd /boot
echo "$kver" > .origver # for tar2fs
make-initrd -N -k "$kver" AUTODETECT= \
FEATURES+="$GLOBAL_VM_INITRDFEATURES" \