diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-30 11:28:28 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-30 11:28:28 -0800 |
commit | c2c002021eab0adff7e4d268535170658a1b0c6c (patch) | |
tree | 845a9eb74dd414f7be715fa1e1cc1a9d547606d5 /templates/system | |
parent | 8697b0750e77cb1b128847ea424acc4ed7457fbc (diff) | |
download | vyatta-cfg-quagga-c2c002021eab0adff7e4d268535170658a1b0c6c.tar.gz vyatta-cfg-quagga-c2c002021eab0adff7e4d268535170658a1b0c6c.zip |
clean up temp file in delete fail case
Diffstat (limited to 'templates/system')
-rw-r--r-- | templates/system/login/user/node.def | 5 |
1 files changed, 4 insertions, 1 deletions
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" |