Skip to content

Commit d559e31

Browse files
committed
Revise crytpo policy show usage
Add an if statement to check for version 8 or 9 because update-crypto-policies --show does not work with EL7
1 parent 5a0a044 commit d559e31

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

osg-system-profiler

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,15 @@ dump_file "/etc/hosts"
184184

185185
run_cmd df --human-readable --print-type
186186
run_cmd free
187-
run_cmd update-crypto-policies --show
187+
188+
version=$(grep -E '^(VERSION)=' /etc/os-release | cut -d '"' -f 2)
189+
190+
if [[ $version == 8* || $version == 9* ]]; then
191+
echo "Crypto Policy is: `update-crypto-policies --show`"
192+
else
193+
echo "Crypto Policy is not available"
194+
195+
fi
188196

189197
dump_file "/proc/cpuinfo"
190198

0 commit comments

Comments
 (0)