commit | 2731f2b86c39abc8cdefd5fae0d5119ce3d7b841 | [log] [tgz] |
---|---|---|
author | Zev Weiss <zev@bewilderbeest.net> | Wed Feb 28 21:40:50 2024 +0000 |
committer | Zev Weiss <zev@bewilderbeest.net> | Wed Feb 28 21:43:30 2024 +0000 |
tree | 4a0ccfc9d5c81288ea334957060beea7e478dc16 | |
parent | 8da5892fadd1fd144925c5d8bb87b72c4eb36c28 [diff] |
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