move maintainance scripts from libexec/slapd to libexec/openldap
This commit is contained in:
		
							parent
							
								
									78a563b273
								
							
						
					
					
						commit
						934ba146a8
					
				| @ -1,7 +1,7 @@ | ||||
| #!/bin/sh | ||||
| # Author: Jan Vcelak <jvcelak@redhat.com> | ||||
| 
 | ||||
| . /usr/libexec/slapd/functions | ||||
| . /usr/libexec/openldap/functions | ||||
| 
 | ||||
| function check_config_syntax() | ||||
| { | ||||
| @ -1,7 +1,7 @@ | ||||
| #!/bin/sh | ||||
| # Author: Jan Vcelak <jvcelak@redhat.com> | ||||
| 
 | ||||
| . /usr/libexec/slapd/functions | ||||
| . /usr/libexec/openldap/functions | ||||
| 
 | ||||
| function help() | ||||
| { | ||||
| @ -1,7 +1,7 @@ | ||||
| #!/bin/sh | ||||
| # Author: Jan Vcelak <jvcelak@redhat.com> | ||||
| 
 | ||||
| . /usr/libexec/slapd/functions | ||||
| . /usr/libexec/openldap/functions | ||||
| 
 | ||||
| if [ `id -u` -ne 0 ]; then | ||||
| 	error "You have to be root to run this command." | ||||
| @ -323,11 +323,11 @@ install -m 0644 %SOURCE3 %{buildroot}%{_sysconfdir}/tmpfiles.d/slapd.conf | ||||
| 
 | ||||
| # setup maintainance scripts | ||||
| mkdir -p %{buildroot}%{_libexecdir} | ||||
| install -m 0755 -d %{buildroot}%{_libexecdir}/slapd | ||||
| install -m 0644 %SOURCE50 %{buildroot}%{_libexecdir}/slapd/functions | ||||
| install -m 0755 %SOURCE51 %{buildroot}%{_libexecdir}/slapd/convert-config.sh | ||||
| install -m 0755 %SOURCE52 %{buildroot}%{_libexecdir}/slapd/check-config.sh | ||||
| install -m 0755 %SOURCE53 %{buildroot}%{_libexecdir}/slapd/upgrade-db.sh | ||||
| install -m 0755 -d %{buildroot}%{_libexecdir}/openldap | ||||
| install -m 0644 %SOURCE50 %{buildroot}%{_libexecdir}/openldap/functions | ||||
| install -m 0755 %SOURCE51 %{buildroot}%{_libexecdir}/openldap/convert-config.sh | ||||
| install -m 0755 %SOURCE52 %{buildroot}%{_libexecdir}/openldap/check-config.sh | ||||
| install -m 0755 %SOURCE53 %{buildroot}%{_libexecdir}/openldap/upgrade-db.sh | ||||
| 
 | ||||
| # remove build root from config files and manual pages | ||||
| perl -pi -e "s|%{buildroot}||g" %{buildroot}%{_sysconfdir}/openldap/*.conf | ||||
| @ -361,7 +361,6 @@ chmod 0644 %{buildroot}%{_libdir}/lib*.*a | ||||
| # new configuration will be generated in %%post | ||||
| mkdir -p %{buildroot}%{_datadir} | ||||
| install -m 0755 -d %{buildroot}%{_datadir}/openldap-servers | ||||
| install -m 0644 %SOURCE4 %{buildroot}%{_datadir}/openldap-servers/slapd.conf.obsolete | ||||
| install -m 0644 %SOURCE5 %{buildroot}%{_datadir}/openldap-servers/slapd.ldif | ||||
| install -m 0700 -d %{buildroot}%{_sysconfdir}/openldap/slapd.d | ||||
| rm -f %{buildroot}%{_sysconfdir}/openldap/slapd.conf | ||||
| @ -439,10 +438,10 @@ fi | ||||
| # generate/upgrade configuration | ||||
| if [ ! -f %{_sysconfdir}/openldap/slapd.d/cn=config.ldif ]; then | ||||
| 	if [ -f %{_sysconfdir}/openldap/slapd.conf ]; then | ||||
| 		%{_libexecdir}/slapd/convert-config.sh &>/dev/null | ||||
| 		%{_libexecdir}/openldap/convert-config.sh &>/dev/null | ||||
| 		mv %{_sysconfdir}/openldap/slapd.conf %{_sysconfdir}/openldap/slapd.conf.bak | ||||
| 	else | ||||
| 		%{_libexecdir}/slapd/convert-config.sh -f %{_datadir}/openldap-servers/slapd.ldif &>/dev/null | ||||
| 		%{_libexecdir}/openldap/convert-config.sh -f %{_datadir}/openldap-servers/slapd.ldif &>/dev/null | ||||
| 	fi | ||||
| fi | ||||
| 
 | ||||
| @ -455,7 +454,7 @@ if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap ]; then | ||||
| 		start_slapd=1 | ||||
| 	fi | ||||
| 
 | ||||
| 	%{_libexecdir}/slapd/upgrade-db.sh &>/dev/null | ||||
| 	%{_libexecdir}/openldap/upgrade-db.sh &>/dev/null | ||||
| 	rm -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap | ||||
| fi | ||||
| 
 | ||||
| @ -554,7 +553,7 @@ if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb ]; then | ||||
| 		start=0 | ||||
| 	fi | ||||
| 
 | ||||
| 	%{_libexecdir}/slapd/upgrade-db.sh &>/dev/null | ||||
| 	%{_libexecdir}/openldap/upgrade-db.sh &>/dev/null | ||||
| 	rm -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb | ||||
| 
 | ||||
| 	[ $start -eq 1 ] && /bin/systemctl start slapd.service &>/dev/null | ||||
| @ -572,6 +571,7 @@ exit 0 | ||||
| %dir %{_sysconfdir}/openldap | ||||
| %dir %{_sysconfdir}/openldap/cacerts | ||||
| %config(noreplace) %{_sysconfdir}/openldap/ldap.conf | ||||
| %dir %{_libexecdir}/openldap/ | ||||
| %{_libdir}/liblber-2.4*.so.* | ||||
| %{_libdir}/libldap-2.4*.so.* | ||||
| %{_libdir}/libldap_r-2.4*.so.* | ||||
| @ -622,7 +622,10 @@ exit 0 | ||||
| %{_libdir}/openldap/translucent* | ||||
| %{_libdir}/openldap/unique* | ||||
| %{_libdir}/openldap/valsort* | ||||
| %{_libexecdir}/slapd/ | ||||
| %{_libexecdir}/openldap/functions | ||||
| %{_libexecdir}/openldap/convert-config.sh | ||||
| %{_libexecdir}/openldap/check-config.sh | ||||
| %{_libexecdir}/openldap/upgrade-db.sh | ||||
| %{_sbindir}/sl* | ||||
| %{_mandir}/man8/* | ||||
| %{_mandir}/man5/slapd*.5* | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user