Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dracut-functions): avoid awk in get_maj_min()
The `get_maj_min()` cache lookup is commonly used across many flows. While `awk` should be available, some highly constrained environments may not have it. A second call to `grep` can provide the same behaviour without adding a dependnecy. Lines in the cache will be of the form "/dev/sda2 8:2". `awk '{print $NF}'` returns the last word of a matching line. Since the initial matching regex is so specific a second call to grep can easily extract the last word. (cherry picked commit ec7efd5) Related: RHEL-47145
- Loading branch information