mkdumprd: reorganize the code to make flow of script clear

Move the invocation of check_resettable() to be together with all
other invocation of functions. This can make the flow of script
clearer and more readable.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Baoquan He 2014-03-03 18:37:15 +08:00 committed by WANG Chao
parent 8c527aba43
commit 2afbb51946

View File

@ -450,10 +450,6 @@ check_resettable()
return 1
}
if ! check_resettable; then
exit 1
fi
# $1: maj:min
is_crypt()
{
@ -482,6 +478,10 @@ check_crypt()
return 1
}
if ! check_resettable; then
exit 1
fi
if ! check_crypt; then
echo "Warning: Encrypted device is in dump path. User will prompted for password during second kernel boot."
fi