We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 641f003 commit 5986c65Copy full SHA for 5986c65
1 file changed
util/grub-mkconfig.in
@@ -109,12 +109,7 @@ do
109
esac
110
done
111
112
-os_name=$(grep '^ID=' /etc/os-release | sed 's/ID=//')
113
-if test "$os_name" = '"rhel"'; then
114
- os_name=redhat
115
-elif test "$os_name" = '"centos"'; then
116
- os_name=centos
117
-fi
+os_name=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g')
118
if test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg" &&\
119
mountpoint -q /boot/efi; then
120
gettext_printf "Running \`grub2-mkconfig -o %s' will overwrite the GRUB wrapper.\n" "$grub_cfg" 1>&2
0 commit comments