mirror of
https://github.com/elitak/nixos-infect
synced 2024-11-10 05:54:20 +00:00
infect: have swap usage optional (#91)
Doesn't work everywhere with swapon, e.g. osuosl openstack cluster. Without swap it can succeed though, it's not a hard prerequisite for the infection to take effect.
This commit is contained in:
parent
2ec52a0ede
commit
36e19e3b30
1 changed files with 6 additions and 2 deletions
|
@ -310,10 +310,14 @@ infect() {
|
|||
|
||||
checkEnv
|
||||
prepareEnv
|
||||
makeSwap # smallest (512MB) droplet needs extra memory!
|
||||
if [[ -z "$NO_SWAP" ]]; then
|
||||
makeSwap # smallest (512MB) droplet needs extra memory!
|
||||
fi
|
||||
makeConf
|
||||
infect
|
||||
removeSwap
|
||||
if [[ -z "$NO_SWAP" ]]; then
|
||||
removeSwap
|
||||
fi
|
||||
|
||||
if [[ -z "$NO_REBOOT" ]]; then
|
||||
reboot
|
||||
|
|
Loading…
Reference in a new issue