forked from pool/virtualbox
Crunch duplicated scriptlets commands
This commit is contained in:
parent
3abb14653c
commit
2c787c3ad3
@ -721,8 +721,7 @@ install -Dm0644 vbox-guest-tools.conf %{buildroot}%{_sysusersdir}/vbox-guest-too
|
|||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
%pre -f vbox.pre
|
%pre -f vbox.pre
|
||||||
%service_add_pre vboxdrv.service
|
%service_add_pre vboxdrv.service vboxautostart-service.service
|
||||||
%service_add_pre vboxautostart-service.service
|
|
||||||
|
|
||||||
%pre guest-tools -f vbox-guest-tools.pre
|
%pre guest-tools -f vbox-guest-tools.pre
|
||||||
%service_add_pre vboxadd-service.service
|
%service_add_pre vboxadd-service.service
|
||||||
@ -741,8 +740,7 @@ install -Dm0644 vbox-guest-tools.conf %{buildroot}%{_sysusersdir}/vbox-guest-too
|
|||||||
%set_permissions %{_vbox_instdir}/VBoxNetDHCP
|
%set_permissions %{_vbox_instdir}/VBoxNetDHCP
|
||||||
%set_permissions %{_vbox_instdir}/VBoxNetAdpCtl
|
%set_permissions %{_vbox_instdir}/VBoxNetAdpCtl
|
||||||
%set_permissions %{_vbox_instdir}/VBoxHeadless
|
%set_permissions %{_vbox_instdir}/VBoxHeadless
|
||||||
%service_add_post vboxdrv.service
|
%service_add_post vboxdrv.service vboxautostart-service.service
|
||||||
%service_add_post vboxautostart-service.service
|
|
||||||
# add new autostart stuff to the existing default config, if missing
|
# add new autostart stuff to the existing default config, if missing
|
||||||
grep -q VBOXAUTOSTART %{_sysconfdir}/default/virtualbox || {
|
grep -q VBOXAUTOSTART %{_sysconfdir}/default/virtualbox || {
|
||||||
cat >> %{_sysconfdir}/default/virtualbox << EOF
|
cat >> %{_sysconfdir}/default/virtualbox << EOF
|
||||||
@ -777,9 +775,7 @@ done
|
|||||||
%verify_permissions -e %{_vbox_instdir}/VBoxSDL
|
%verify_permissions -e %{_vbox_instdir}/VBoxSDL
|
||||||
|
|
||||||
%post guest-tools
|
%post guest-tools
|
||||||
%service_add_post vboxadd-service.service
|
%service_add_post vboxadd-service.service vboxclient.service vboxservice.service
|
||||||
%service_add_post vboxclient.service
|
|
||||||
%service_add_post vboxservice.service
|
|
||||||
|
|
||||||
%post websrv
|
%post websrv
|
||||||
%service_add_post vboxweb-service.service
|
%service_add_post vboxweb-service.service
|
||||||
@ -794,24 +790,16 @@ VBoxManage extpack install --replace "${EXTPACK}" --accept-license="${ACCEPT}" >
|
|||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%stop_on_removal vboxautostart-service
|
%service_del_preun vboxautostart-service.service vboxdrv.service
|
||||||
%stop_on_removal vboxdrv
|
|
||||||
%service_del_preun vboxautostart-service.service
|
|
||||||
%service_del_preun vboxdrv.service
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%preun guest-tools
|
%preun guest-tools
|
||||||
%stop_on_removal vboxadd-service
|
|
||||||
%stop_on_removal vboxadd
|
%stop_on_removal vboxadd
|
||||||
%service_del_preun vboxadd-service.service
|
%service_del_preun vboxadd-service.service
|
||||||
%systemd_preun vboxclient.service
|
%systemd_preun vboxclient.service vboxservice.service
|
||||||
%systemd_preun vboxservice.service
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%preun websrv
|
%preun websrv
|
||||||
%stop_on_removal vboxweb-service
|
%stop_on_removal vboxweb-service
|
||||||
%service_del_preun vboxweb-service.service
|
%service_del_preun vboxweb-service.service
|
||||||
exit 0
|
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# scriptlets postun
|
# scriptlets postun
|
||||||
@ -819,27 +807,18 @@ exit 0
|
|||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%restart_on_update vboxdrv
|
|
||||||
%restart_on_update vboxautostart-service
|
|
||||||
# immediately restarting virtualbox may not work. As such wait for the next reboot to restart
|
# immediately restarting virtualbox may not work. As such wait for the next reboot to restart
|
||||||
%if ! %{defined service_del_postun_without_restart}
|
%if ! %{defined service_del_postun_without_restart}
|
||||||
export DISABLE_RESTART_ON_UPDATE=yes
|
export DISABLE_RESTART_ON_UPDATE=yes
|
||||||
%service_del_postun vboxautostart-service.service
|
%service_del_postun vboxautostart-service.service vboxdrv.service
|
||||||
%service_del_postun vboxdrv.service
|
|
||||||
%else
|
%else
|
||||||
%service_del_postun_without_restart vboxautostart-service.service
|
%service_del_postun_without_restart vboxautostart-service.service vboxdrv.service
|
||||||
%service_del_postun_without_restart vboxdrv.service
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun guest-tools
|
%postun guest-tools
|
||||||
%restart_on_update vboxadd
|
%service_del_postun vboxadd-service.service vboxclient.service vboxservice.service
|
||||||
%restart_on_update vboxadd-service
|
|
||||||
%service_del_postun vboxadd-service.service
|
|
||||||
%service_del_postun vboxclient.service
|
|
||||||
%service_del_postun vboxservice.service
|
|
||||||
|
|
||||||
%postun websrv
|
%postun websrv
|
||||||
%restart_on_update vboxweb-service
|
|
||||||
%service_del_postun vboxweb-service.service
|
%service_del_postun vboxweb-service.service
|
||||||
#
|
#
|
||||||
#######################################################
|
#######################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user