Browse Source

updated vbuilder.sh.in

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@3352 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 years ago
parent
commit
76cd106783
2 changed files with 3 additions and 5 deletions
  1. 1 1
      vbootstrap-vl.spec
  2. 2 4
      vbuilder.sh.in

+ 1 - 1
vbootstrap-vl.spec

@@ -80,7 +80,7 @@ vbuilder は vbootstrap を利用して chroot 環境の構築し、
 
 
 %changelog
-* Xxx Xxx XX XXXX Munehiro Yamamoto <munepi@vinelinux.org> 0.0.41-1
+* Fri Apr 08 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.41-1
 - updated vbuilder.sh.in
   - dropped user_from_uid()
 

+ 2 - 4
vbuilder.sh.in

@@ -119,10 +119,8 @@ setup-vbuilder(){
     ## check $SUDO_USER and $USERHELPER_UID
     RPM_SIGN_USER=$SUDO_USER
     if [ -z "${RPM_SIGN_USER}" ]; then
-	local entries=$(getent passwd $USERHELPER_UID)
-	if [ $? -eq 0 ]; then
-	    RPM_SIGN_USER=$(echo $entries | cut -d":" -f3)
-	else
+	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"
 	    return 1
 	fi