Bladeren bron

updated vbuilder.sh.in: fixed setup-vbuilder()

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@3967 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 jaren geleden
bovenliggende
commit
9a2d22128d
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 4 4
      vbuilder.sh.in

+ 4 - 4
vbuilder.sh.in

@@ -112,11 +112,11 @@ setup-vbuilder(){
     ## check $SUDO_USER and $USERHELPER_UID
     RPM_SIGN_USER=$SUDO_USER
     if [ -z "${RPM_SIGN_USER}" ]; then
-	RPM_SIGN_USER=$(getent passwd $USERHELPER_UID | cut -d":" -f1)
-	if [ -z "${RPM_SIGN_USER}" ]; then
-	    echo $"W: \$SUDO_USER and \$USERHELPER_UID are empty"
+	[ -z "${USERHELPER_UID}" ] && \
+	    echo $"W: \$SUDO_USER and \$USERHELPER_UID are empty" && \
 	    return 1
-	fi
+	    
+	RPM_SIGN_USER=$(getent passwd $USERHELPER_UID | cut -d":" -f1)
     fi
     ## get $RPM_SIGN_USER's home directory
     HOME=$(getent passwd $RPM_SIGN_USER |  cut -d":" -f6)