[icinga-checkins] icinga.org: icinga2/master: Move the icinga2-prepare-dirs script to /usr/ lib

git at icinga.org git at icinga.org
Thu Nov 27 14:34:29 CET 2014


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

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Nov 27 14:33:26 2014 +0100

Move the icinga2-prepare-dirs script to /usr/lib

fixes #7786

---

 doc/CMakeLists.txt                   |    2 +-
 doc/icinga2-prepare-dirs.8           |   28 ----------------------------
 etc/initsystem/CMakeLists.txt        |    4 ++--
 etc/initsystem/icinga2.init.d.cmake  |    2 +-
 etc/initsystem/icinga2.service.cmake |    2 +-
 icinga2.spec                         |    3 +--
 6 files changed, 6 insertions(+), 35 deletions(-)

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 7c8a834..cf20942 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -19,7 +19,7 @@ file(GLOB DOCSRCS "*.md")
 
 if(UNIX OR CYGWIN)
   install(
-    FILES icinga2.8 icinga2-prepare-dirs.8
+    FILES icinga2.8
     DESTINATION ${CMAKE_INSTALL_MANDIR}/man8
   )
 endif()
diff --git a/doc/icinga2-prepare-dirs.8 b/doc/icinga2-prepare-dirs.8
deleted file mode 100644
index 20104a9..0000000
--- a/doc/icinga2-prepare-dirs.8
+++ /dev/null
@@ -1,28 +0,0 @@
-.TH ICINGA2 "15" "June 2014" "icinga2 - The Icinga 2 network monitoring daemon." "System Administration Utilities"
-
-.SH NAME
-icinga2-prepare-dirs \- Prepare directories and their permissions for use by Icinga 2.
-
-.SH DESCRIPTION
-This script is used internally by the initscripts of Icinga 2 to prepare
-prepare directories and their permissions. This script is not intended to be called by users.
-
-.SH OPTIONS
-.TP
-\fB<sysconfig file>\fR
-Absolute path to the sysconfig file of Icinga 2.
-
-.SH AUTHOR
-Icinga2 is maintained by the Icinga Project <info at icinga.org>.
-
-.SH "REPORTING BUGS"
-Report bugs at <https://dev.icinga.org/>
-.br
-Icinga home page: <http://www.icinga.org/>
-
-.SH COPYRIGHT
-Copyright \(co 2012\-2014 Icinga Development Team (http://www.icinga.org)
-License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
-.br
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
diff --git a/etc/initsystem/CMakeLists.txt b/etc/initsystem/CMakeLists.txt
index 630c9f4..9734150 100644
--- a/etc/initsystem/CMakeLists.txt
+++ b/etc/initsystem/CMakeLists.txt
@@ -29,8 +29,8 @@ if(NOT WIN32)
   )
 
   install(
-    FILES icinga2-prepare-dirs
-    DESTINATION ${CMAKE_INSTALL_SBINDIR}
+    FILES prepare-dirs
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/icinga2
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
   )
 
diff --git a/etc/initsystem/icinga2.init.d.cmake b/etc/initsystem/icinga2.init.d.cmake
index c474193..5d4b991 100644
--- a/etc/initsystem/icinga2.init.d.cmake
+++ b/etc/initsystem/icinga2.init.d.cmake
@@ -62,7 +62,7 @@ fi
 # Start Icinga 2
 start() {
 	printf "Starting Icinga 2: "
-	@CMAKE_INSTALL_FULL_SBINDIR@/icinga2-prepare-dirs $SYSCONFIGFILE
+	@CMAKE_INSTALL_PREFIX@/lib/icinga2/prepare-dirs $SYSCONFIGFILE
 
 	if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -d -e $ICINGA2_ERROR_LOG > $ICINGA2_STARTUP_LOG 2>&1; then
 		echo "Error starting Icinga. Check '$ICINGA2_STARTUP_LOG' for details."
diff --git a/etc/initsystem/icinga2.service.cmake b/etc/initsystem/icinga2.service.cmake
index 512a9fe..4f63805 100644
--- a/etc/initsystem/icinga2.service.cmake
+++ b/etc/initsystem/icinga2.service.cmake
@@ -5,7 +5,7 @@ After=syslog.target postgresql.service mariadb.service carbon-cache.service
 [Service]
 Type=forking
 EnvironmentFile=@ICINGA2_SYSCONFIGFILE@
-ExecStartPre=@CMAKE_INSTALL_FULL_SBINDIR@/icinga2-prepare-dirs @ICINGA2_SYSCONFIGFILE@
+ExecStartPre=@CMAKE_INSTALL_PREFIX@/lib/icinga2/prepare-dirs @ICINGA2_SYSCONFIGFILE@
 ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/icinga2 daemon -d -e ${ICINGA2_ERROR_LOG}
 PIDFile=@ICINGA2_RUNDIR@/icinga2/icinga2.pid
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/icinga2.spec b/icinga2.spec
index de5ce67..12b9912 100644
--- a/icinga2.spec
+++ b/icinga2.spec
@@ -485,8 +485,7 @@ exit 0
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/repository.d/*
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.d/*
 %config(noreplace) %{_sysconfdir}/%{name}/scripts/*
-%{_sbindir}/%{name}-prepare-dirs
-%{_mandir}/man8/%{name}-prepare-dirs.8.gz
+/usr/lib/icinga2/prepare-dirs
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp



More information about the icinga-checkins mailing list