grubby-bls: make info print the root parameter if is present in cmdline
The old grubby tool printed the root parameter separated from the other kernel command line arguments. Make the wrapper have the same behaviour. Resolves: rhbz#1649791 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
parent
6cdfe45ece
commit
695377d276
20
grubby-bls
20
grubby-bls
@ -223,9 +223,27 @@ display_info_values() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for i in ${indexes[*]}; do
|
for i in ${indexes[*]}; do
|
||||||
|
local root=""
|
||||||
|
local args=${bls_options[$i]}
|
||||||
|
local opts=(${args})
|
||||||
|
|
||||||
|
for opt in ${opts[*]}; do
|
||||||
|
if echo $opt | grep -q "^root="; then
|
||||||
|
root="$(echo $opt | sed -e 's/root=//')"
|
||||||
|
value="$(echo ${opt} | sed -e 's/\//\\\//g')"
|
||||||
|
args="$(echo ${args} | sed -e "s/${value}[ \t]*//")"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
echo "index=$i"
|
echo "index=$i"
|
||||||
echo "kernel=\"${prefix}${bls_linux[$i]}\""
|
echo "kernel=\"${prefix}${bls_linux[$i]}\""
|
||||||
echo "args=\"${bls_options[$i]}\""
|
echo "args=\"${args}\""
|
||||||
|
|
||||||
|
if [[ -n $root ]]; then
|
||||||
|
echo "root=\"${root}\""
|
||||||
|
fi
|
||||||
|
|
||||||
echo "initrd=\"${prefix}${bls_initrd[$i]}\""
|
echo "initrd=\"${prefix}${bls_initrd[$i]}\""
|
||||||
echo "title=\"${bls_title[$i]}\""
|
echo "title=\"${bls_title[$i]}\""
|
||||||
echo "id=\"${bls_id[$i]}\""
|
echo "id=\"${bls_id[$i]}\""
|
||||||
|
Loading…
Reference in New Issue
Block a user