3
0
Fork 0
forked from mirrors/nixpkgs

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
No known key found for this signature in database
GPG key ID: 5E4C836C632C2882

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;
}