nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0203-Fix-coverity-issues-in-shell-scripts-1226325.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Robert Marshall <rmarshall@redhat.com>
f725e3
Date: Thu, 7 Jul 2016 15:05:26 -0400
f725e3
Subject: [PATCH] Fix coverity issues in shell scripts (#1226325)
f725e3
f725e3
Remove unused variables called out by coverity. Convert a non-quoted
f725e3
variable to a quoted variable without use of deprecated backticks.
f725e3
f725e3
Related: rhbz#1226325
f725e3
---
f725e3
 util/grub-get-kernel-settings.in | 9 ---------
f725e3
 util/grub-mkconfig.in            | 2 +-
f725e3
 2 files changed, 1 insertion(+), 10 deletions(-)
f725e3
f725e3
diff --git a/util/grub-get-kernel-settings.in b/util/grub-get-kernel-settings.in
f725e3
index ae0b4696d49..cee8c209650 100644
f725e3
--- a/util/grub-get-kernel-settings.in
f725e3
+++ b/util/grub-get-kernel-settings.in
f725e3
@@ -21,27 +21,18 @@ prefix="@prefix@"
f725e3
 exec_prefix="@exec_prefix@"
f725e3
 datarootdir="@datarootdir@"
f725e3
 
f725e3
-prefix="@prefix@"
f725e3
 exec_prefix="@exec_prefix@"
f725e3
 sbindir="@sbindir@"
f725e3
 bindir="@bindir@"
f725e3
-sysconfdir="@sysconfdir@"
f725e3
 PACKAGE_NAME=@PACKAGE_NAME@
f725e3
 PACKAGE_VERSION=@PACKAGE_VERSION@
f725e3
-host_os=@host_os@
f725e3
 datadir="@datadir@"
f725e3
 if [ "x$pkgdatadir" = x ]; then
f725e3
     pkgdatadir="${datadir}/@PACKAGE@"
f725e3
 fi
f725e3
-grub_cfg=""
f725e3
 
f725e3
 self=`basename $0`
f725e3
 
f725e3
-grub_probe="${sbindir}/@grub_probe@"
f725e3
-grub_file="${bindir}/@grub_file@"
f725e3
-grub_editenv="${bindir}/@grub_editenv@"
f725e3
-grub_script_check="${bindir}/@grub_script_check@"
f725e3
-
f725e3
 export TEXTDOMAIN=@PACKAGE@
f725e3
 export TEXTDOMAINDIR="@localedir@"
f725e3
 
f725e3
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
f725e3
index aa4fdb8a3b2..86801aa4e5c 100644
f725e3
--- a/util/grub-mkconfig.in
f725e3
+++ b/util/grub-mkconfig.in
f725e3
@@ -149,7 +149,7 @@ if test -f ${sysconfdir}/default/grub ; then
f725e3
   . ${sysconfdir}/default/grub
f725e3
 fi
f725e3
 
f725e3
-eval `${grub_get_kernel_settings}` || true
f725e3
+eval "$("${grub_get_kernel_settings}")" || true
f725e3
 
f725e3
 if [ "x$GRUB_DISABLE_UUID" != "xtrue" -a -z "$GRUB_DEVICE_UUID" ]; then
f725e3
   GRUB_DEVICE_UUID="$GRUB_DEVICE_UUID_GENERATED"