f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Peter Jones <pjones@redhat.com>
f725e3
Date: Fri, 4 Dec 2015 09:28:38 -0500
f725e3
Subject: [PATCH] 01_users: Handle GRUB_PASSWORD better.
f725e3
f725e3
Only handle GRUB_PASSWORD not GRUB2_PASSWORD (as that's more likely to
f725e3
be acceptable upstream).
f725e3
f725e3
Related: rhbz#1284370
f725e3
f725e3
Signed-off-by: Peter Jones <pjones@redhat.com>
f725e3
---
f725e3
 util/grub-setpassword.8 | 2 +-
f725e3
 util/grub.d/01_users.in | 2 +-
f725e3
 2 files changed, 2 insertions(+), 2 deletions(-)
f725e3
f725e3
diff --git a/util/grub-setpassword.8 b/util/grub-setpassword.8
f725e3
index 5973abef4ab..49200a848b7 100644
f725e3
--- a/util/grub-setpassword.8
f725e3
+++ b/util/grub-setpassword.8
f725e3
@@ -9,7 +9,7 @@
f725e3
 \fBgrub-setpassword\fR outputs the user.cfg file which contains the hashed GRUB bootloader password. This utility only supports configurations where there is a single root user.
f725e3
 
f725e3
 The file has the format:
f725e3
-GRUB_2PASSWORD=<\fIhashed password\fR>.
f725e3
+GRUB2_PASSWORD=<\fIhashed password\fR>.
f725e3
 
f725e3
 .SH OPTIONS
f725e3
 .TP
f725e3
diff --git a/util/grub.d/01_users.in b/util/grub.d/01_users.in
f725e3
index facd409e722..db2f44bfb78 100644
f725e3
--- a/util/grub.d/01_users.in
f725e3
+++ b/util/grub.d/01_users.in
f725e3
@@ -2,7 +2,7 @@
f725e3
 cat << EOF
f725e3
 if [ -f \${prefix}/user.cfg ]; then
f725e3
   source \${prefix}/user.cfg
f725e3
-  if [ -n \${GRUB2_PASSWORD} ]; then
f725e3
+  if [ -n "\${GRUB2_PASSWORD}" ]; then
f725e3
     set superusers="root"
f725e3
     export superusers
f725e3
     password_pbkdf2 root \${GRUB2_PASSWORD}