[Pkg-shadow-commits] r2988 - debian/trunk/tests/usertools/09_userdel_del_homedir

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Fri May 22 11:44:21 UTC 2009


Author: nekral-guest
Date: 2009-05-22 11:44:21 +0000 (Fri, 22 May 2009)
New Revision: 2988

Modified:
   debian/trunk/tests/usertools/09_userdel_del_homedir/userdel.test
Log:
Updated traps. Avoid removal of files not created by the testsuite


Modified: debian/trunk/tests/usertools/09_userdel_del_homedir/userdel.test
===================================================================
--- debian/trunk/tests/usertools/09_userdel_del_homedir/userdel.test	2009-05-22 11:19:38 UTC (rev 2987)
+++ debian/trunk/tests/usertools/09_userdel_del_homedir/userdel.test	2009-05-22 11:44:21 UTC (rev 2988)
@@ -12,13 +12,15 @@
 save_config
 
 # restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config; rm -rf /var/mail/foo /home/foo' 0
+trap 'log_status "$0" "FAILURE"; restore_config' 0
 
 change_config
 
 mkdir /home/foo
+trap 'log_status "$0" "FAILURE"; restore_config; rm -rf /home/foo' 0
 echo toto > /home/foo/toto
 touch /var/mail/foo
+trap 'log_status "$0" "FAILURE"; restore_config; rm -rf /var/mail/foo /home/foo' 0
 chown -R foo:foo /var/mail/foo /home/foo
 
 echo -n "Delete user foo (userdel -r foo)..."




More information about the Pkg-shadow-commits mailing list