Lines 21-31
Link Here
|
21 |
: ${options:=' '} |
21 |
: ${options:=' '} |
22 |
elif [ -n "$swap" ]; then |
22 |
elif [ -n "$swap" ]; then |
23 |
local foo |
23 |
local foo |
24 |
einfo "Checking swap is not LUKS" |
24 |
einfo "Checking that swap partition does not contain a known file system" |
25 |
cryptsetup isLuks ${source} 2>/dev/null >/dev/console </dev/console |
25 |
blkid -s TYPE "${source}" 2>/dev/null >/dev/console </dev/console |
26 |
foo="$?" |
26 |
foo="$?" |
27 |
if [ "${foo}" -eq 0 ]; then |
27 |
if [ "${foo}" -eq 0 ]; then |
28 |
ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup." |
28 |
ewarn "The swap partition that you have defined contains a recognizable file system. Aborting crypt-swap setup." |
29 |
return |
29 |
return |
30 |
fi |
30 |
fi |
31 |
target=${swap} |
31 |
target=${swap} |