scripts: Unlink our temporary post scripts

I just happened to do an `ls /usr` on my workstation. Sigh 😣

Closes: #822
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-06-08 11:47:51 -04:00 committed by Atomic Bot
parent 5da409fcad
commit 1977e3cfba
2 changed files with 4 additions and 0 deletions

View File

@ -220,6 +220,7 @@ run_script_in_bwrap_container (int rootfs_fd,
ret = TRUE;
out:
(void) unlinkat (rootfs_fd, postscript_path_host, 0);
if (created_var_tmp)
(void) unlinkat (rootfs_fd, "var/tmp", AT_REMOVEDIR);
return ret;

View File

@ -41,6 +41,9 @@ vm_reboot
vm_assert_layered_pkg scriptpkg1 present
echo "ok pkg scriptpkg1 added"
vm_cmd "test ! -f /usr/scriptpkg1.posttrans"
echo "ok no embarrassing crud leftover"
# let's check that the group was successfully added
vm_cmd getent group scriptpkg1
echo "ok group scriptpkg1 active"