mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
zfs: fix boot on non-zfs-root systems
This commit is contained in:
parent
7c32447065
commit
d6d1cc4c40
2 changed files with 57 additions and 1 deletions
56
srcpkgs/zfs/patches/0002-fix-dracut-root.patch
Normal file
56
srcpkgs/zfs/patches/0002-fix-dracut-root.patch
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
From eefe83eaa68f7cb4a49c580dd940d3688e42c849 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Toyam Cox <aviator45003@gmail.com>
|
||||||
|
Date: Thu, 30 Jun 2022 13:47:58 -0400
|
||||||
|
Subject: [PATCH] dracut: fix boot on non-zfs-root systems
|
||||||
|
|
||||||
|
Simply prevent overwriting root until it needs to be overwritten.
|
||||||
|
|
||||||
|
Dracut could change this value before this module is called, but won't
|
||||||
|
change the kernel command line.
|
||||||
|
|
||||||
|
Reviewed-by: Andrew J. Hesford <ajh@sideband.org>
|
||||||
|
Signed-off-by: Toyam Cox <vaelatern@voidlinux.org>
|
||||||
|
Closes #13592
|
||||||
|
---
|
||||||
|
contrib/dracut/90zfs/zfs-lib.sh.in | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/contrib/dracut/90zfs/zfs-lib.sh.in b/contrib/dracut/90zfs/zfs-lib.sh.in
|
||||||
|
index e44673c2d75..3a43e514d6f 100755
|
||||||
|
--- a/contrib/dracut/90zfs/zfs-lib.sh.in
|
||||||
|
+++ b/contrib/dracut/90zfs/zfs-lib.sh.in
|
||||||
|
@@ -88,11 +88,11 @@ decode_root_args() {
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
- root=$(getarg root=)
|
||||||
|
+ xroot=$(getarg root=)
|
||||||
|
rootfstype=$(getarg rootfstype=)
|
||||||
|
|
||||||
|
# shellcheck disable=SC2249
|
||||||
|
- case "$root" in
|
||||||
|
+ case "$xroot" in
|
||||||
|
""|zfs|zfs:|zfs:AUTO)
|
||||||
|
root=zfs:AUTO
|
||||||
|
rootfstype=zfs
|
||||||
|
@@ -100,7 +100,7 @@ decode_root_args() {
|
||||||
|
;;
|
||||||
|
|
||||||
|
ZFS=*|zfs:*)
|
||||||
|
- root="${root#zfs:}"
|
||||||
|
+ root="${xroot#zfs:}"
|
||||||
|
root="${root#ZFS=}"
|
||||||
|
root=$(echo "$root" | tr '+' ' ')
|
||||||
|
rootfstype=zfs
|
||||||
|
@@ -109,9 +109,9 @@ decode_root_args() {
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ "$rootfstype" = "zfs" ]; then
|
||||||
|
- case "$root" in
|
||||||
|
+ case "$xroot" in
|
||||||
|
"") root=zfs:AUTO ;;
|
||||||
|
- *) root=$(echo "$root" | tr '+' ' ') ;;
|
||||||
|
+ *) root=$(echo "$xroot" | tr '+' ' ') ;;
|
||||||
|
esac
|
||||||
|
return 0
|
||||||
|
fi
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'zfs'
|
# Template file for 'zfs'
|
||||||
pkgname=zfs
|
pkgname=zfs
|
||||||
version=2.1.5
|
version=2.1.5
|
||||||
revision=1
|
revision=2
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-config=user --with-mounthelperdir=/usr/bin
|
configure_args="--with-config=user --with-mounthelperdir=/usr/bin
|
||||||
--with-udevdir=/usr/lib/udev --with-udevruledir=/usr/lib/udev/rules.d
|
--with-udevdir=/usr/lib/udev --with-udevruledir=/usr/lib/udev/rules.d
|
||||||
|
|
Loading…
Add table
Reference in a new issue