From 38150e590efc0e25f0192568eaf580a2ddbbf170 Mon Sep 17 00:00:00 2001 From: Jeremy Huntwork Date: Tue, 1 Nov 2005 12:45:16 +0000 Subject: [PATCH] Moved the root test to within the run_make function - no need to limit the creation of the Makefile or the extraction of the commands to root only --- jhalfs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/jhalfs b/jhalfs index f3ad66d..7015c1a 100755 --- a/jhalfs +++ b/jhalfs @@ -824,6 +824,11 @@ run_make() { #----------------------------# # Test if make must be run. if [ "$RUNMAKE" = "1" ] ; then + # Test to make sure we're running the build as root + if [ "$UID" != "0" ] ; then + echo "You must be logged in as root to successfully build LFS." + exit 1 + fi # Build the system if [ -e $MKFILE ] ; then echo -ne "Building the LFS system...\n" @@ -839,13 +844,6 @@ run_make() { ### MAIN ### ################################### -# Test to make sure we're running the build as root - -if [ "$UID" != "0" ] ; then - echo "You must be logged in as root to successfully build LFS." - exit 1 -fi - # Evaluate any command line switches while test $# -gt 0 ; do