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
parent
2d83bce21b
commit
122657b2fe
|
@ -709,9 +709,9 @@ get_ucode_file() {
|
||||||
local family
|
local family
|
||||||
local model
|
local model
|
||||||
local stepping
|
local stepping
|
||||||
family=$(grep -E "cpu family" /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/.*:\ //)
|
model=$(grep -E "model" /proc/cpuinfo | grep -v name | head -1 | sed "s/.*:\ //")
|
||||||
stepping=$(grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //)
|
stepping=$(grep -E "stepping" /proc/cpuinfo | head -1 | sed "s/.*:\ //")
|
||||||
|
|
||||||
if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
|
if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
|
||||||
if [[ $family -ge 21 ]]; then
|
if [[ $family -ge 21 ]]; then
|
||||||
|
|
Loading…
Reference in New Issue