Blame 0022-base-init.sh-ignore-exclamation-mark-for-kmod-static.patch

Harald Hoyer eeb1c2
From fa45d0d9c9109f3c2953ad02d7e3aa69c4e09add Mon Sep 17 00:00:00 2001
Harald Hoyer eeb1c2
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer eeb1c2
Date: Mon, 1 Dec 2014 11:50:00 +0100
Harald Hoyer eeb1c2
Subject: [PATCH] base/init.sh: ignore exclamation mark for kmod static-nodes
Harald Hoyer eeb1c2
Harald Hoyer eeb1c2
newer versions add an exclamation mark for the type, to mark it to be
Harald Hoyer eeb1c2
created on boot only.
Harald Hoyer eeb1c2
---
Harald Hoyer eeb1c2
 modules.d/99base/init.sh | 19 ++++++++++---------
Harald Hoyer eeb1c2
 1 file changed, 10 insertions(+), 9 deletions(-)
Harald Hoyer eeb1c2
Harald Hoyer eeb1c2
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
Harald Hoyer eeb1c2
index 3afe6d5..5f66d1f 100755
Harald Hoyer eeb1c2
--- a/modules.d/99base/init.sh
Harald Hoyer eeb1c2
+++ b/modules.d/99base/init.sh
Harald Hoyer eeb1c2
@@ -73,15 +73,16 @@ fi
Harald Hoyer eeb1c2
 if command -v kmod >/dev/null 2>/dev/null; then
Harald Hoyer eeb1c2
     kmod static-nodes --format=tmpfiles 2>/dev/null | \
Harald Hoyer eeb1c2
         while read type file mode a a a majmin; do
Harald Hoyer eeb1c2
-        case $type in
Harald Hoyer eeb1c2
-            d)
Harald Hoyer eeb1c2
-                mkdir -m $mode -p $file
Harald Hoyer eeb1c2
-                ;;
Harald Hoyer eeb1c2
-            c)
Harald Hoyer eeb1c2
-                mknod -m $mode $file $type ${majmin%:*} ${majmin#*:}
Harald Hoyer eeb1c2
-                ;;
Harald Hoyer eeb1c2
-        esac
Harald Hoyer eeb1c2
-    done
Harald Hoyer eeb1c2
+            type=${type%\!}
Harald Hoyer eeb1c2
+            case $type in
Harald Hoyer eeb1c2
+                d)
Harald Hoyer eeb1c2
+                    mkdir -m $mode -p $file
Harald Hoyer eeb1c2
+                    ;;
Harald Hoyer eeb1c2
+                c)
Harald Hoyer eeb1c2
+                    mknod -m $mode $file $type ${majmin%:*} ${majmin#*:}
Harald Hoyer eeb1c2
+                    ;;
Harald Hoyer eeb1c2
+            esac
Harald Hoyer eeb1c2
+        done
Harald Hoyer eeb1c2
 fi
Harald Hoyer eeb1c2
 
Harald Hoyer eeb1c2
 trap "action_on_fail Signal caught!" 0