phosphor-static-norootfs-init: Be a little more careful with substring matches

The existing grep could match something that merely contains
"factory-reset" as a substring, even if it were something like
"no-factory-reset".  Adding the '-w' flag ensures we only match complete
words.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Ia6a041a2ec8c1d065fc08f514fee2b2e6fc1c850
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/21-factory-reset b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/21-factory-reset
index 0c435f8..00c9f83 100644
--- a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/21-factory-reset
+++ b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/21-factory-reset
@@ -8,6 +8,6 @@
 mkdir /run/lock
 
 # Check uboot keys for 'factory-reset'
-if /sbin/fw_printenv openbmcinit openbmconce | grep -q factory-reset ; then
+if /sbin/fw_printenv openbmcinit openbmconce | grep -w -q factory-reset ; then
     echo "factory-reset" >> /run/format-persist
 fi