From c2c002021eab0adff7e4d268535170658a1b0c6c Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 30 Jan 2008 11:28:28 -0800 Subject: clean up temp file in delete fail case --- templates/system/login/user/node.def | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/system/login/user/node.def b/templates/system/login/user/node.def index d05ac373..a04e990f 100644 --- a/templates/system/login/user/node.def +++ b/templates/system/login/user/node.def @@ -16,7 +16,10 @@ if [ x$(@) == xroot ]; then \ fi && \ if mkdir /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID >& /dev/null; \ then \ - sudo /opt/vyatta/sbin/vyatta_update_login_user.pl -d '$(@)'; \ + if ! sudo /opt/vyatta/sbin/vyatta_update_login_user.pl -d '$(@)'; then \ + rm -rf /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID; \ + exit 1; \ + fi; \ else \ exit 1; \ fi" -- cgit v1.2.3