mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-11-01 00:29:57 +03:00
more robust removeSwap
During my nixos-infect tests I have sometimes canceled infection in the middle. Rerun of nixos-infect failed because there were some old swap files, which were no longer available as swap devices. `swapoff -a` will handle this for us (we are going reboot anyway)
This commit is contained in:
parent
89b92f3de1
commit
1f8634dd48
1 changed files with 2 additions and 5 deletions
|
@ -127,11 +127,8 @@ makeSwap() {
|
|||
}
|
||||
|
||||
removeSwap() {
|
||||
for swapFile in /tmp/nixos-infect.*.swp
|
||||
do
|
||||
swapoff -v "$swapFile"
|
||||
rm -vf "$swapFile"
|
||||
done
|
||||
swapoff -a
|
||||
rm -vf /tmp/nixos-infect.*.swp
|
||||
}
|
||||
|
||||
prepareEnv() {
|
||||
|
|
Loading…
Reference in a new issue