nixos-container: check for correct path for chattr

Could fail on destroy if the container wasn't created correctly
wip/yesman
Robin Gloster 7 years ago
parent 3ac02dfc40
commit 91e74ed3b2
No known key found for this signature in database
GPG Key ID: 5E4C836C632C2882
  1. 2
      pkgs/tools/virtualization/nixos-container/nixos-container.pl

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

Loading…
Cancel
Save