Explorar o código

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 %!s(int64=13) %!d(string=hai) anos
pai
achega
9a2d22128d
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  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)