[Ovirt-devel] [PATCH node] Adds a function for checking if storage was configured. bz#504331
Darryl L. Pierce
dpierce at redhat.com
Fri Jun 5 16:06:44 UTC 2009
The function checks to see if the LV HostVG/Config is present. Since all
persisted configuration files are stored there, this must be present in
order to set any stateful configuration options.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
scripts/ovirt-functions | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index 5997a4c..a692fc8 100755
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -78,6 +78,16 @@ is_standalone() {
if is_managed; then return 1; else return 0; fi
}
+# return 0 if local storage is configured
+# return 1 if local storage is not configured
+is_local_storage_configured () {
+ if lvs HostVG/Config >/dev/null >&1; then
+ return 0
+ fi
+
+ return 1
+}
+
# perform automatic local disk installation
# when at least following boot parameters are present:
# for networking - OVIRT_BOOTIF, management NIC
--
1.6.0.6
More information about the ovirt-devel
mailing list