fix(dracut-functions): word splitting issue for sed in get_ucode_file

This unquated regex could be splitted into two arguments and sed will
not work. I've see giving error of wrong arguments being used on my
desktop.

Signed-off-by: Kairui Song <kasong@redhat.com>
master
Kairui Song 2021-04-10 00:57:32 +08:00 committed by Harald Hoyer
parent 2d83bce21b
commit 122657b2fe
1 changed files with 3 additions and 3 deletions

View File

@ -709,9 +709,9 @@ get_ucode_file() {
local family
local model
local stepping
family=$(grep -E "cpu family" /proc/cpuinfo | head -1 | sed s/.*:\ //)
model=$(grep -E "model" /proc/cpuinfo | grep -v name | head -1 | sed s/.*:\ //)
stepping=$(grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //)
family=$(grep -E "cpu family" /proc/cpuinfo | head -1 | sed "s/.*:\ //")
model=$(grep -E "model" /proc/cpuinfo | grep -v name | head -1 | sed "s/.*:\ //")
stepping=$(grep -E "stepping" /proc/cpuinfo | head -1 | sed "s/.*:\ //")

if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
if [[ $family -ge 21 ]]; then