diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-20 00:19:53 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-20 00:19:53 -0500 |
commit | 1fa3717743c217bb3dbe643a37a7ba96b5ff0ebd (patch) | |
tree | 07d68982ceb9c9201fe750d7f973012bb1eff133 /hscript/user.cc | |
parent | f4202f7fcf0484b31e36db187de8557a8eba3065 (diff) | |
download | horizon-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.cc | 6 |
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 */ } |