[icinga-checkins] icinga.org: icinga2/master: Cleanup unused functions from icinga-installer

git at icinga.org git at icinga.org
Tue Aug 16 14:55:03 CEST 2016


Module: icinga2
Branch: master
Commit: ae38f160de3b4e15664fd6a06bddb56056163d30
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=ae38f160de3b4e15664fd6a06bddb56056163d30

Author: Rune Darrud <theflyingcorpse at gmail.com>
Date:   Tue Aug 16 14:07:52 2016 +0200

Cleanup unused functions from icinga-installer

fixes #12452

---

 icinga-installer/icinga-installer.cpp |   25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/icinga-installer/icinga-installer.cpp b/icinga-installer/icinga-installer.cpp
index 5fb1051..8ff139b 100644
--- a/icinga-installer/icinga-installer.cpp
+++ b/icinga-installer/icinga-installer.cpp
@@ -96,14 +96,6 @@ static bool PathExists(const std::string& path)
 	return (_stat(path.c_str(), &statbuf) >= 0);
 }
 
-static void CopyFile(const std::string& source, const std::string& target)
-{
-	std::ifstream ifs(source.c_str(), std::ios::binary);
-	std::ofstream ofs(target.c_str(), std::ios::binary | std::ios::trunc);
-
-	ofs << ifs.rdbuf();
-}
-
 static std::string GetIcingaDataPath(void)
 {
 	char path[MAX_PATH];
@@ -132,18 +124,6 @@ static void MkDirP(const std::string& path)
 	}
 }
 
-static void CopyConfigFile(const std::string& installDir, const std::string& sourceConfigPath, size_t skelPrefixLength)
-{
-	std::string relativeConfigPath = sourceConfigPath.substr(skelPrefixLength);
-
-	std::string targetConfigPath = installDir + relativeConfigPath;
-
-	if (!PathExists(targetConfigPath)) {
-		MkDirP(DirName(targetConfigPath));
-		CopyFile(sourceConfigPath, targetConfigPath);
-	}
-}
-
 static std::string GetNSISInstallPath(void)
 {
 	HKEY hKey;
@@ -164,11 +144,6 @@ static std::string GetNSISInstallPath(void)
 	return "";
 }
 
-static void CollectPaths(std::vector<std::string>& paths, const std::string& path)
-{
-	paths.push_back(path);
-}
-
 static bool CopyDirectory(const std::string& source, const std::string& destination)
 {
 	// SHFileOperation requires file names to be terminated with two \0s



More information about the icinga-checkins mailing list