nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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