[Patch v3 2/3] mkdumprd: reorganize the code to make flow of script clear
Baoquan He
bhe at redhat.com
Mon Mar 3 10:37:15 UTC 2014
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 at redhat.com>
---
mkdumprd | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mkdumprd b/mkdumprd
index 0b71391..f7d2f4d 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -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
--
1.8.3.1
More information about the kexec
mailing list