summaryrefslogtreecommitdiff
path: root/meta-phosphor
diff options
context:
space:
mode:
authorZev Weiss <zev@bewilderbeest.net>2024-02-29 00:40:50 +0300
committerZev Weiss <zev@bewilderbeest.net>2024-02-29 00:43:30 +0300
commit2731f2b86c39abc8cdefd5fae0d5119ce3d7b841 (patch)
tree4a0ccfc9d5c81288ea334957060beea7e478dc16 /meta-phosphor
parent8da5892fadd1fd144925c5d8bb87b72c4eb36c28 (diff)
downloadopenbmc-2731f2b86c39abc8cdefd5fae0d5119ce3d7b841.tar.xz
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
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/21-factory-reset2
1 files changed, 1 insertions, 1 deletions
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 0c435f8924..00c9f83d39 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 @@ fi
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