main/mkinitfs: backport fix for warning message during boot

This commit is contained in:
Sören Tempel 2019-12-19 22:46:35 +01:00
parent 9a161edf90
commit 64d8a02abb
2 changed files with 28 additions and 3 deletions

View File

@ -0,0 +1,24 @@
From 6e5b1852be0247803ea070a6708010a0d3c2bc3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Thu, 19 Dec 2019 22:39:11 +0100
Subject: [PATCH] init: quote $rootfstype during comparison
Without this change this may result in a warning message to be printed
during boot if the rootfstype kernel parameter is not set.
---
initramfs-init.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/initramfs-init.in b/initramfs-init.in
index 76f284c..eaacb13 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -503,7 +503,7 @@ if [ -n "$KOPT_root" ]; then
mkdir -p /media/root-rw/work /media/root-rw/root
mount -t overlay -o lowerdir=/media/root-ro,upperdir=/media/root-rw/root,workdir=/media/root-rw/work overlayfs $sysroot
else
- if [ $rootfstype = "zfs" ]; then
+ if [ "$rootfstype" = "zfs" ]; then
prepare_zfs_root
fi
mount ${rootfstype:+-t} ${rootfstype} \

View File

@ -2,7 +2,7 @@
pkgname=mkinitfs
pkgver=3.4.4
_ver=${pkgver%_git*}
pkgrel=0
pkgrel=1
pkgdesc="Tool to generate initramfs images for Alpine"
url="https://git.alpinelinux.org/cgit/mkinitfs"
arch="all"
@ -16,7 +16,7 @@ subpackages="$pkgname-doc"
install="$pkgname.pre-upgrade $pkgname.post-install $pkgname.post-upgrade"
triggers="$pkgname.trigger=/usr/share/kernel/*"
source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_ver.tar.xz
"
0001-init-quote-rootfstype-during-comparison.patch"
build() {
cd "$builddir"
@ -28,4 +28,5 @@ package() {
make install DESTDIR="$pkgdir"
}
sha512sums="0f26969cb0e6627e7594f09038ada99ea1fa161de918834b95a92d5ba41ebe2ffa93510e2797310f98c963a3140dbde53747064f43ebc31c15bb061a56173ee5 mkinitfs-3.4.4.tar.xz"
sha512sums="0f26969cb0e6627e7594f09038ada99ea1fa161de918834b95a92d5ba41ebe2ffa93510e2797310f98c963a3140dbde53747064f43ebc31c15bb061a56173ee5 mkinitfs-3.4.4.tar.xz
2cf3c2fb190e0001c4c29495cd1f3661a75ae61cd540f77759836b0cca13c638e7c3789c1456dbc27be124cf6f7ebc688815a1ad8a2dff09f4e75eac62a67d58 0001-init-quote-rootfstype-during-comparison.patch"