Move xinit post scripts
Resolves: RHEL-66126 spec file lacks some xinit conditional judgments
This commit is contained in:
parent
ef53034e96
commit
97fb58c34f
13
ibus.spec
13
ibus.spec
@ -450,21 +450,24 @@ make check \
|
|||||||
VERBOSE=1 \
|
VERBOSE=1 \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
%post
|
%post xinit
|
||||||
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
|
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ "$1" -eq 0 ]; then
|
if [ "$1" -eq 0 ]; then
|
||||||
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
|
|
||||||
# if alternative was set to manual, reset to auto
|
|
||||||
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
|
|
||||||
|
|
||||||
# 'dconf update' sometimes does not update the db...
|
# 'dconf update' sometimes does not update the db...
|
||||||
dconf update || :
|
dconf update || :
|
||||||
[ -f %{_sysconfdir}/dconf/db/ibus ] && \
|
[ -f %{_sysconfdir}/dconf/db/ibus ] && \
|
||||||
rm %{_sysconfdir}/dconf/db/ibus || :
|
rm %{_sysconfdir}/dconf/db/ibus || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%postun xinit
|
||||||
|
if [ "$1" -eq 0 ]; then
|
||||||
|
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
|
||||||
|
# if alternative was set to manual, reset to auto
|
||||||
|
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
|
||||||
|
fi
|
||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
dconf update || :
|
dconf update || :
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user