mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-12-23 00:28:28 +03: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
|
checkEnv
|
||||||
prepareEnv
|
prepareEnv
|
||||||
|
if [[ -z "$NO_SWAP" ]]; then
|
||||||
makeSwap # smallest (512MB) droplet needs extra memory!
|
makeSwap # smallest (512MB) droplet needs extra memory!
|
||||||
|
fi
|
||||||
makeConf
|
makeConf
|
||||||
infect
|
infect
|
||||||
|
if [[ -z "$NO_SWAP" ]]; then
|
||||||
removeSwap
|
removeSwap
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z "$NO_REBOOT" ]]; then
|
if [[ -z "$NO_REBOOT" ]]; then
|
||||||
reboot
|
reboot
|
||||||
|
|
Loading…
Reference in a new issue