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 \
|
||||
%{nil}
|
||||
|
||||
%post
|
||||
%post xinit
|
||||
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
|
||||
|
||||
%postun
|
||||
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 || :
|
||||
[ -f %{_sysconfdir}/dconf/db/ibus ] && \
|
||||
rm %{_sysconfdir}/dconf/db/ibus || :
|
||||
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
|
||||
dconf update || :
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user