nixos-container: fix destroy with immutable /var/empty

fixes #21573
This commit is contained in:
Robin Gloster
2017-02-18 22:40:31 +01:00
parent 0860565ee0
commit 492101dfce

View File

@@ -248,6 +248,7 @@ if ($action eq "destroy") {
safeRemoveTree($profileDir) if -e $profileDir;
safeRemoveTree($gcRootsDir) if -e $gcRootsDir;
system("chattr", "-i", "$root/var/empty") if -e $root;
safeRemoveTree($root) if -e $root;
unlink($confFile) or die;
}