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,'; } get_label() { echo "${1# *}" | sed -r 's,.*elbrus-([0-9a-z]+)-.*$,\1,'; }
KVERSIONS= KVERSIONS=
if [ -s .origver ]; then KVERSIONS="$(chroot "$ROOTFS" rpm -qa 'kernel-image*' \
while read kver; do --qf '%{installtime} %{version}-%{name}-%{release}\n' \
KVERSIONS="$KVERSIONS $kver" | sort -n \
done < .origver | cut -f 2 -d ' ' \
fi | sed 's/kernel-image-//')"
[ -n "$KVERSIONS" ] || fatal "unable to deduce kernel version" [ -n "$KVERSIONS" ] || fatal "unable to deduce kernel version"
rm -f .origver 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; } [ -n "$kver" ] || { echo "** unable to deduce kernel version" >&2; exit 1; }
cd /boot cd /boot
echo "$kver" > .origver # for tar2fs
make-initrd -N -k "$kver" AUTODETECT= \ make-initrd -N -k "$kver" AUTODETECT= \
FEATURES+="$GLOBAL_VM_INITRDFEATURES" \ FEATURES+="$GLOBAL_VM_INITRDFEATURES" \