diff --git a/aaa_base.spec b/aaa_base.spec index e9fda81..d4507b6 100644 --- a/aaa_base.spec +++ b/aaa_base.spec @@ -17,6 +17,11 @@ # icecream 0 +#Compat macro for new _fillupdir macro introduced in Nov 2017 +%if ! %{defined _fillupdir} + %define _fillupdir /var/adm/fillup-templates +%endif + Name: aaa_base Version: 84.87+git20171128.a6752e8 Release: 0 @@ -130,9 +135,18 @@ install -d -m 755 %buildroot/usr/lib/initscripts/legacy-actions # keep as ghost for migration touch %buildroot/etc/inittab +mkdir -p %{buildroot}%{_fillupdir} %if "%{_fillupdir}" != "/var/adm/fillup-templates" - mkdir -p %{buildroot}$(dirname %{_fillupdir}) - mv %{buildroot}/var/adm/fillup-templates %{buildroot}%{_fillupdir} + for f in %{buildroot}/var/adm/fillup-templates/* ; do + mv $f %{buildroot}%{_fillupdir}/ + done + rm -vrf %{buildroot}/var/adm/fillup-templates +%endif +%if "%{_fillupdir}" != "/usr/share/fillup-templates" + for f in %{buildroot}/usr/share/fillup-templates/* ; do + mv $f %{buildroot}%{_fillupdir}/ + done + rm -vrf %{buildroot}/usr/share/fillup-templates %endif %pre -f aaa_base.pre