summaryrefslogtreecommitdiff
path: root/mk/install
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-04-29 03:49:12 +0000
committerjlam <jlam@pkgsrc.org>2006-04-29 03:49:12 +0000
commitffdf92793ea2b8e0909792e818c3c6e76d7a2879 (patch)
tree5cd0c0ea131e6aeeec195c5d10434305b5047a11 /mk/install
parent0022419f9dd7c566b686bc0f450be066440a69d1 (diff)
downloadpkgsrc-ffdf92793ea2b8e0909792e818c3c6e76d7a2879.tar.gz
Remove the test file in all exit conditions.
Diffstat (limited to 'mk/install')
-rw-r--r--mk/install/usergroupfuncs6
-rw-r--r--mk/install/usergroupfuncs.DragonFly6
-rw-r--r--mk/install/usergroupfuncs.FreeBSD6
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