[arch-projects] [mkinitcpio] [PATCH 3/6] install/consolefont: Get rid of grep and eval

Kurt J. Bosch kjb-temp-2009 at alpenjodel.de
Sat Jul 23 07:21:03 EDT 2011


Since mkinitcpio is in BASH, there is no need for using grep and eval for parsing rc.conf.
---
 install/consolefont |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/install/consolefont b/install/consolefont
index e12cc4f..9337d49 100644
--- a/install/consolefont
+++ b/install/consolefont
@@ -5,7 +5,7 @@ build() {
     BINARIES=""
     FILES=""
     SCRIPT="consolefont"
-    eval "$(grep -e "^CONSOLEFONT=" /etc/rc.conf)"
+    CONSOLEFONT=$( . /etc/rc.conf; echo "$CONSOLEFONT" )
     if [[ $CONSOLEFONT ]]; then
         if [[ -e /usr/share/kbd/consolefonts/$CONSOLEFONT.psfu.gz ]]; then
             CONSOLEFONT_FILE_GZ="/usr/share/kbd/consolefonts/$CONSOLEFONT.psfu.gz"
-- 
1.7.1



More information about the arch-projects mailing list