... | ... |
@@ -28,12 +28,13 @@ function core_alim () { |
28 | 28 |
function clean_swap () { |
29 | 29 |
_turn 2 || return |
30 | 30 |
echo 1 > /proc/sys/vm/drop_caches |
31 |
- if free -m | awk ' |
|
31 |
+ if LANG=C free -m | awk ' |
|
32 | 32 |
/^Swap:/ { |
33 | 33 |
used = $3 |
34 | 34 |
} |
35 | 35 |
END { |
36 |
- exit (used > 31) |
|
36 |
+ bash_exit_code = !(used > 31) |
|
37 |
+ exit bash_exit_code |
|
37 | 38 |
} |
38 | 39 |
'; then |
39 | 40 |
systemctl stop dphys-swapfile \ |
... | ... |
@@ -93,7 +93,8 @@ function clean_swap () { |
93 | 93 |
used = $3 |
94 | 94 |
} |
95 | 95 |
END { |
96 |
- exit (used > 62) |
|
96 |
+ bash_exit_code = !(used > 62) |
|
97 |
+ exit bash_exit_code |
|
97 | 98 |
} |
98 | 99 |
'; then |
99 | 100 |
systemctl stop dphys-swapfile \ |