Skip to content

Commit c71afca

Browse files
committed
Ensure fips commands exists before using it
Commit fixes failures which occur in some Bolt operating scenarios when OS is a RedHat derivative and commands for enabling fips are missing.
1 parent 57f5a9b commit c71afca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/precheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if grep -qi ubuntu /etc/os-release; then
77
osfamily="ubuntu"
88
elif grep -qi sles /etc/os-release; then
99
osfamily="sles"
10-
elif grep -qi redhat /etc/os-release && fips-mode-setup --is-enabled; then
10+
elif grep -qi redhat /etc/os-release && (which fips-mode-setup &>/dev/null && fips-mode-setup --is-enabled); then
1111
osfamily="redhatfips"
1212
else
1313
osfamily="el"

0 commit comments

Comments
 (0)