pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install Remove the test file in all exit conditions.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1c58a7c94ea8
branches:  trunk
changeset: 512033:1c58a7c94ea8
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Apr 29 03:49:12 2006 +0000

description:
Remove the test file in all exit conditions.

diffstat:

 mk/install/usergroupfuncs           |  6 +++---
 mk/install/usergroupfuncs.DragonFly |  6 +++---
 mk/install/usergroupfuncs.FreeBSD   |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r 96947ee32838 -r 1c58a7c94ea8 mk/install/usergroupfuncs
--- a/mk/install/usergroupfuncs Sat Apr 29 03:09:40 2006 +0000
+++ b/mk/install/usergroupfuncs Sat Apr 29 03:49:12 2006 +0000
@@ -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 @@
                ${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 @@
                ${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 -r 96947ee32838 -r 1c58a7c94ea8 mk/install/usergroupfuncs.DragonFly
--- a/mk/install/usergroupfuncs.DragonFly       Sat Apr 29 03:09:40 2006 +0000
+++ b/mk/install/usergroupfuncs.DragonFly       Sat Apr 29 03:49:12 2006 +0000
@@ -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 @@
                ${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 @@
                ${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 -r 96947ee32838 -r 1c58a7c94ea8 mk/install/usergroupfuncs.FreeBSD
--- a/mk/install/usergroupfuncs.FreeBSD Sat Apr 29 03:09:40 2006 +0000
+++ b/mk/install/usergroupfuncs.FreeBSD Sat Apr 29 03:49:12 2006 +0000
@@ -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 @@
                ${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 @@
                ${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



Home | Main Index | Thread Index | Old Index