Remove the migrate-hosts script

fixes #7398
This commit is contained in:
Gunnar Beutner 2014-11-13 11:15:55 +01:00
parent f20d9010c0
commit 5e1099394a
4 changed files with 0 additions and 44 deletions

View 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)

View 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,-)

View 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
)

View File

@ -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