public inbox for initramfs@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] Check rd.zfcp= format in dracut hook:cmdline process stage
@ 2015-10-16  2:04 Zhiguo Deng
       [not found] ` <1444961074-5096-1-git-send-email-bjzgdeng-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Zhiguo Deng @ 2015-10-16  2:04 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Zhiguo Deng

When using rd.zfcp= parameter in generic.prm file, wrong format
parameters will prevent the zfcp driver to add the correct SCSI
disk. dracut should die when a wrong rd.zfcp= parameter supplied.

Signed-off-by: Zhiguo Deng <bjzgdeng-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
 modules.d/95zfcp/parse-zfcp.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh
index 9b22d93..91d790b 100755
--- a/modules.d/95zfcp/parse-zfcp.sh
+++ b/modules.d/95zfcp/parse-zfcp.sh
@@ -5,6 +5,8 @@
 getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf
 
 for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
+    echo $zfcp_arg | grep '0\.[0-9a-fA-F]\.[0-9a-fA-F]\{4\},0x[0-9a-fA-F]\{16\},0x[0-9a-fA-F]\{16\}' >/dev/null
+    test $? -ne 0 && die "For argument 'rd.zfcp=$zfcp_arg'\nSorry, invalid format."
     (
         IFS=","
         set $zfcp_arg
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-13 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-16  2:04 [Patch] Check rd.zfcp= format in dracut hook:cmdline process stage Zhiguo Deng
     [not found] ` <1444961074-5096-1-git-send-email-bjzgdeng-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2015-11-13 13:02   ` Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox