summaryrefslogtreecommitdiff
path: root/hscript/user.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-20 00:19:53 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-20 00:19:53 -0500
commit1fa3717743c217bb3dbe643a37a7ba96b5ff0ebd (patch)
tree07d68982ceb9c9201fe750d7f973012bb1eff133 /hscript/user.cc
parentf4202f7fcf0484b31e36db187de8557a8eba3065 (diff)
downloadhorizon-1fa3717743c217bb3dbe643a37a7ba96b5ff0ebd.tar.gz
horizon-1fa3717743c217bb3dbe643a37a7ba96b5ff0ebd.tar.bz2
horizon-1fa3717743c217bb3dbe643a37a7ba96b5ff0ebd.tar.xz
horizon-1fa3717743c217bb3dbe643a37a7ba96b5ff0ebd.zip
Make Installation Environment code conditional
Diffstat (limited to 'hscript/user.cc')
-rw-r--r--hscript/user.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/hscript/user.cc b/hscript/user.cc
index ec59a67..b288070 100644
--- a/hscript/user.cc
+++ b/hscript/user.cc
@@ -147,7 +147,7 @@ bool RootPassphrase::execute(ScriptOptions options) const {
return true;
}
- /* LCOV_EXCL_START */
+#ifdef HAS_INSTALL_ENV
/* This was tested on gwyn during development. */
std::ifstream old_shadow("/target/etc/shadow");
if(!old_shadow) {
@@ -179,7 +179,9 @@ bool RootPassphrase::execute(ScriptOptions options) const {
}
new_shadow << shadow_stream.str();
return true;
- /* LCOV_EXCL_STOP */
+#else
+ return false;
+#endif /* HAS_INSTALL_ENV */
}