diff options
author | jlam <jlam@pkgsrc.org> | 2006-04-29 03:49:12 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-04-29 03:49:12 +0000 |
commit | e9ce2213fb6fd871722ea9b22b4e7cc9e105dae1 (patch) | |
tree | 5cd0c0ea131e6aeeec195c5d10434305b5047a11 | |
parent | 15f40fb5dd8207019844f845a873920424d9a165 (diff) | |
download | pkgsrc-e9ce2213fb6fd871722ea9b22b4e7cc9e105dae1.tar.gz |
Remove the test file in all exit conditions.
-rw-r--r-- | mk/install/usergroupfuncs | 6 | ||||
-rw-r--r-- | mk/install/usergroupfuncs.DragonFly | 6 | ||||
-rw-r--r-- | mk/install/usergroupfuncs.FreeBSD | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/mk/install/usergroupfuncs b/mk/install/usergroupfuncs index bf330d7dfbf..e01758ddc6c 100644 --- a/mk/install/usergroupfuncs +++ b/mk/install/usergroupfuncs @@ -1,4 +1,4 @@ -# $NetBSD: usergroupfuncs,v 1.7 2006/04/27 22:44:09 jlam Exp $ +# $NetBSD: usergroupfuncs,v 1.8 2006/04/29 03:49:12 jlam Exp $ # # Default implementations of user_exists() and group_exists() shell # functions for checking the existence of users and groups, and of @@ -35,7 +35,7 @@ group_exists() ${RM} -f $_testfile; return 2 elif ${TEST} -z "$_groupid"; then # $_group doesn't exist and $_groupid is not set - return 1 + ${RM} -f $_testfile; return 1 elif ${CHGRP} $_groupid $_testfile >/dev/null 2>&1; then _name=`${LS} -l $_testfile 2>/dev/null | ${AWK} '{ print $4 }'` if ${TEST} "$_name" != "$_groupid"; then @@ -72,7 +72,7 @@ user_exists() ${RM} -f $_testfile; return 2 elif ${TEST} -z "$_userid"; then # $_user doesn't exist and $_userid is not set - return 1 + ${RM} -f $_testfile; return 1 elif ${CHOWN} $_userid $_testfile >/dev/null 2>&1; then _name=`${LS} -l $_testfile 2>/dev/null | ${AWK} '{ print $3 }'` if ${TEST} "$_name" != "$_userid"; then diff --git a/mk/install/usergroupfuncs.DragonFly b/mk/install/usergroupfuncs.DragonFly index d802aa6467a..3d3ddaae250 100644 --- a/mk/install/usergroupfuncs.DragonFly +++ b/mk/install/usergroupfuncs.DragonFly @@ -1,4 +1,4 @@ -# $NetBSD: usergroupfuncs.DragonFly,v 1.5 2006/04/27 22:44:09 jlam Exp $ +# $NetBSD: usergroupfuncs.DragonFly,v 1.6 2006/04/29 03:49:12 jlam Exp $ # # Platform-specific adduser and addgroup functionality # on top of pw(8). @@ -27,7 +27,7 @@ group_exists() ${RM} -f $_testfile; return 2 elif ${TEST} -z "$_groupid"; then # $_group doesn't exist and $_groupid is not set - return 1 + ${RM} -f $_testfile; return 1 elif ${CHGRP} $_groupid $_testfile >/dev/null 2>&1; then _name=`${LS} -l $_testfile 2>/dev/null | ${AWK} '{ print $4 }'` if ${TEST} "$_name" != "$_groupid"; then @@ -64,7 +64,7 @@ user_exists() ${RM} -f $_testfile; return 2 elif ${TEST} -z "$_userid"; then # $_user doesn't exist and $_user is not set - return 1 + ${RM} -f $_testfile; return 1 elif ${CHOWN} $_userid $_testfile >/dev/null 2>&1; then _name=`${LS} -l $_testfile 2>/dev/null | ${AWK} '{ print $3 }'` if ${TEST} "$_name" != "$_userid"; then diff --git a/mk/install/usergroupfuncs.FreeBSD b/mk/install/usergroupfuncs.FreeBSD index 31f14b9074a..82aa3735a83 100644 --- a/mk/install/usergroupfuncs.FreeBSD +++ b/mk/install/usergroupfuncs.FreeBSD @@ -1,4 +1,4 @@ -# $NetBSD: usergroupfuncs.FreeBSD,v 1.5 2006/04/27 22:44:09 jlam Exp $ +# $NetBSD: usergroupfuncs.FreeBSD,v 1.6 2006/04/29 03:49:12 jlam Exp $ # # Platform-specific adduser and addgroup functionality # on top of pw(8). @@ -27,7 +27,7 @@ group_exists() ${RM} -f $_testfile; return 2 elif ${TEST} -z "$_groupid"; then # $_group doesn't exist and $_groupid is not set - return 1 + ${RM} -f $_testfile; return 1 elif ${CHGRP} $_groupid $_testfile >/dev/null 2>&1; then _name=`${LS} -l $_testfile 2>/dev/null | ${AWK} '{ print $4 }'` if ${TEST} "$_name" != "$_groupid"; then @@ -64,7 +64,7 @@ user_exists() ${RM} -f $_testfile; return 2 elif ${TEST} -z "$_userid"; then # $_user doesn't exist and $_user is not set - return 1 + ${RM} -f $_testfile; return 1 elif ${CHOWN} $_userid $_testfile >/dev/null 2>&1; then _name=`${LS} -l $_testfile 2>/dev/null | ${AWK} '{ print $3 }'` if ${TEST} "$_name" != "$_userid"; then |