Skip to content

Commit

Permalink
fix(dracut-functions): word splitting issue for sed in get_ucode_file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ryncsn authored and haraldh committed Apr 12, 2021
1 parent 2d83bce commit 122657b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dracut-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 122657b

Please sign in to comment.