Enable Linux swap
()
| 95 | |
| 96 | |
| 97 | def enable_swap_linux(): |
| 98 | """Enable Linux swap""" |
| 99 | logger.debug(_("Re-enabling swap.")) |
| 100 | args = ["swapon", "-a"] |
| 101 | p = subprocess.Popen(args, stderr=subprocess.PIPE) |
| 102 | p.wait() |
| 103 | outputs = p.communicate() |
| 104 | if 0 != p.returncode: |
| 105 | raise RuntimeError(outputs[1].replace("\n", "")) |
| 106 | |
| 107 | |
| 108 | def make_self_oom_target_linux(): |
no outgoing calls