>From 5ac165a021fd361bad658ff50b59ae3e0c4c478d Mon Sep 17 00:00:00 2001
From: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date: Fri, 16 Jul 2021 17:41:25 +0100
Subject: [PATCH] initsripts: mount-functions: Do not check efivarfs in
 /proc/filsystems

It is typically loaded on demand so this is not useful.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
---
 debian/src/initscripts/lib/init/mount-functions.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh
index 73b45a79..709323af 100644
--- a/debian/src/initscripts/lib/init/mount-functions.sh
+++ b/debian/src/initscripts/lib/init/mount-functions.sh
@@ -206,6 +206,11 @@ domount () {
 		case "$KERNEL" in
 			*)	FSTYPE=$PRIFSTYPE ;;
 		esac
+	elif [ "$PRIFSTYPE" = efivarfs ]; then
+		# accept efivarfs if its mountpoint exists; kernel will auto-load the module
+		if test -d /sys/firmware/efi/efivars; then
+			FSTYPE=$PRIFSTYPE
+		fi
 	elif grep -E -qs "$PRIFSTYPE\$" /proc/filesystems; then
 		FSTYPE=$PRIFSTYPE
 	elif grep -E -qs "$ALTFSTYPE\$" /proc/filesystems; then
-- 
2.20.1

