mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-17 01:55:10 +00:00
Detect non-partition swaps
This commit is contained in:
parent
8e9cc7d5c2
commit
0e49dfc7a0
2
tomb
2
tomb
@ -136,7 +136,7 @@ safe_filename() {
|
|||||||
check_swap() {
|
check_swap() {
|
||||||
# Return 0 if NO swap is used, 1 if swap is used
|
# Return 0 if NO swap is used, 1 if swap is used
|
||||||
# Return 2 if swap(s) is(are) used, but ALL encrypted
|
# Return 2 if swap(s) is(are) used, but ALL encrypted
|
||||||
local swaps=$(awk '/partition/ { print $1 }' /proc/swaps 2>/dev/null)
|
local swaps=$(awk '/^\// { print $1 }' /proc/swaps 2>/dev/null)
|
||||||
[[ -z "$swaps" ]] && return 0 # No swap partition is active
|
[[ -z "$swaps" ]] && return 0 # No swap partition is active
|
||||||
no "An active swap partition is detected, this poses security risks."
|
no "An active swap partition is detected, this poses security risks."
|
||||||
no "You can deactivate all swap partitions using the command:"
|
no "You can deactivate all swap partitions using the command:"
|
||||||
|
Loading…
Reference in New Issue
Block a user