nixos-container: check for correct path for chattr

Could fail on destroy if the container wasn't created correctly
This commit is contained in:
Robin Gloster 2017-03-22 15:11:19 +01:00
parent 3ac02dfc40
commit 91e74ed3b2
No known key found for this signature in database
GPG Key ID: 5E4C836C632C2882

View File

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