]> granicus.if.org Git - icinga2/commitdiff
Remove the migrate-hosts script
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 13 Nov 2014 10:15:55 +0000 (11:15 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 13 Nov 2014 10:15:55 +0000 (11:15 +0100)
fixes #7398

debian/icinga2-common.postinst
icinga2.spec
tools/CMakeLists.txt
tools/migrate-hosts.cmake [deleted file]

index 4b56639d8083b616d45d25cf31c560685a09c2f5..e1c6b49fdff30260535833cc769f7dd8a799770c 100644 (file)
@@ -64,8 +64,6 @@ case "$1" in
 
         # enable default features
         enable_default_features $@
-
-        /usr/share/icinga2/migrate-hosts
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
index 0e076e5106e11d489bc19b14e5889e673446b7ef..c58e6d0b5bdc40769b92dd3fa131e5c853630477 100644 (file)
@@ -265,8 +265,6 @@ exit 0
 %endif
 
 %post common
-/usr/share/icinga2/migrate-hosts
-
 # suse
 %if "%{_vendor}" == "suse"
 %if 0%{?suse_version} >= 1310
@@ -437,7 +435,6 @@ exit 0
 %{_libdir}/%{name}
 %{_datadir}/%{name}
 %exclude %{_datadir}/%{name}/include
-%exclude %{_datadir}/%{name}/migrate-hosts
 %{_mandir}/man8/%{name}.8.gz
 
 %attr(0750,%{icinga_user},%{icingacmd_group}) %{_localstatedir}/cache/%{name}
@@ -490,7 +487,6 @@ exit 0
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
 %{_datadir}/%{name}/include
-%{_datadir}/%{name}/migrate-hosts
 
 %files doc
 %defattr(-,root,root,-)
index 51744a4cb2d80e9ec7d99e3d8f569357f559ffe6..ce2c4cb6e094c74c1c53d340a0df86448faf4fa7 100644 (file)
@@ -19,10 +19,3 @@ add_subdirectory(mkclass)
 add_subdirectory(mkembedconfig)
 add_subdirectory(mkunity)
 
-configure_file(migrate-hosts.cmake ${CMAKE_CURRENT_BINARY_DIR}/migrate-hosts @ONLY)
-
-install(
-  FILES ${CMAKE_CURRENT_BINARY_DIR}/migrate-hosts
-  DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2
-  PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
-)
diff --git a/tools/migrate-hosts.cmake b/tools/migrate-hosts.cmake
deleted file mode 100644 (file)
index 5e2d17e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-# Moves configuration files from /etc/icinga2/conf.d/hosts/<fqdn>
-# as backup files. TODO: Remove script before 2.2 release.
-
-icinga2bin=@CMAKE_INSTALL_FULL_SBINDIR@/icinga2
-sysconfdir=`$icinga2bin variable get --current SysconfDir`
-
-if [ -z "$sysconfdir" ]; then
-       echo "Could not determine SysconfDir"
-       exit 1
-fi
-
-target="`hostname -f`"
-if [ ! -e $sysconfdir/icinga2/repository.d/hosts/$target.conf ]; then
-       exit 0
-fi
-
-mv $sysconfdir/icinga2/repository.d/hosts/$target.conf $sysconfdir/icinga2/repository.d/hosts/$target.conf.bak
-
-if [ -d $sysconfdir/icinga2/repository.d/hosts/$target ]; then
-       for file in $sysconfdir/icinga2/repository.d/hosts/$target/*.conf; do
-               if [ ! -e $file ]; then
-                       break
-                fi
-
-               mv $file $file.bak
-       done
-fi
-
-echo "Moved repository FQDN host in $sysconfdir/icinga2/repository.d/hosts/$target as backup. Please migrate your changes to all new conf.d/{hosts,services.conf}"
-exit 0