summaryrefslogtreecommitdiff
path: root/hscript/disk.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-29 10:54:50 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-29 10:54:50 -0500
commitbad42ab94bb518b334521ac5394421e6513d55d8 (patch)
tree7386ea9186bb87f2042ad57a7be7f27f61e59a0f /hscript/disk.cc
parent7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64 (diff)
downloadhorizon-bad42ab94bb518b334521ac5394421e6513d55d8.tar.gz
horizon-bad42ab94bb518b334521ac5394421e6513d55d8.tar.bz2
horizon-bad42ab94bb518b334521ac5394421e6513d55d8.tar.xz
horizon-bad42ab94bb518b334521ac5394421e6513d55d8.zip
hscript: Only use LVMGroup::test_pv in install env builds
Diffstat (limited to 'hscript/disk.cc')
-rw-r--r--hscript/disk.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc
index 634e56f..bec5d3e 100644
--- a/hscript/disk.cc
+++ b/hscript/disk.cc
@@ -531,6 +531,7 @@ bool LVMGroup::validate(ScriptOptions) const {
}
bool LVMGroup::test_pv(ScriptOptions) const {
+#ifdef HAS_INSTALL_ENV
const char *fstype = blkid_get_tag_value(nullptr, "TYPE",
this->pv().c_str());
if(fstype == nullptr) {
@@ -539,6 +540,9 @@ bool LVMGroup::test_pv(ScriptOptions) const {
}
return (strcmp(fstype, "LVM2_member") == 0);
+#else
+ return true;
+#endif
}
bool LVMGroup::execute(ScriptOptions) const {