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
|
||||
%service_add_pre vboxdrv.service
|
||||
%service_add_pre vboxautostart-service.service
|
||||
%service_add_pre vboxdrv.service vboxautostart-service.service
|
||||
|
||||
%pre guest-tools -f vbox-guest-tools.pre
|
||||
%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}/VBoxNetAdpCtl
|
||||
%set_permissions %{_vbox_instdir}/VBoxHeadless
|
||||
%service_add_post vboxdrv.service
|
||||
%service_add_post vboxautostart-service.service
|
||||
%service_add_post vboxdrv.service vboxautostart-service.service
|
||||
# add new autostart stuff to the existing default config, if missing
|
||||
grep -q VBOXAUTOSTART %{_sysconfdir}/default/virtualbox || {
|
||||
cat >> %{_sysconfdir}/default/virtualbox << EOF
|
||||
@ -777,9 +775,7 @@ done
|
||||
%verify_permissions -e %{_vbox_instdir}/VBoxSDL
|
||||
|
||||
%post guest-tools
|
||||
%service_add_post vboxadd-service.service
|
||||
%service_add_post vboxclient.service
|
||||
%service_add_post vboxservice.service
|
||||
%service_add_post vboxadd-service.service vboxclient.service vboxservice.service
|
||||
|
||||
%post websrv
|
||||
%service_add_post vboxweb-service.service
|
||||
@ -794,24 +790,16 @@ VBoxManage extpack install --replace "${EXTPACK}" --accept-license="${ACCEPT}" >
|
||||
#######################################################
|
||||
|
||||
%preun
|
||||
%stop_on_removal vboxautostart-service
|
||||
%stop_on_removal vboxdrv
|
||||
%service_del_preun vboxautostart-service.service
|
||||
%service_del_preun vboxdrv.service
|
||||
exit 0
|
||||
%service_del_preun vboxautostart-service.service vboxdrv.service
|
||||
|
||||
%preun guest-tools
|
||||
%stop_on_removal vboxadd-service
|
||||
%stop_on_removal vboxadd
|
||||
%service_del_preun vboxadd-service.service
|
||||
%systemd_preun vboxclient.service
|
||||
%systemd_preun vboxservice.service
|
||||
exit 0
|
||||
%systemd_preun vboxclient.service vboxservice.service
|
||||
|
||||
%preun websrv
|
||||
%stop_on_removal vboxweb-service
|
||||
%service_del_preun vboxweb-service.service
|
||||
exit 0
|
||||
|
||||
#######################################################
|
||||
# scriptlets postun
|
||||
@ -819,27 +807,18 @@ exit 0
|
||||
|
||||
%postun
|
||||
/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
|
||||
%if ! %{defined service_del_postun_without_restart}
|
||||
export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%service_del_postun vboxautostart-service.service
|
||||
%service_del_postun vboxdrv.service
|
||||
%service_del_postun vboxautostart-service.service vboxdrv.service
|
||||
%else
|
||||
%service_del_postun_without_restart vboxautostart-service.service
|
||||
%service_del_postun_without_restart vboxdrv.service
|
||||
%service_del_postun_without_restart vboxautostart-service.service vboxdrv.service
|
||||
%endif
|
||||
|
||||
%postun guest-tools
|
||||
%restart_on_update vboxadd
|
||||
%restart_on_update vboxadd-service
|
||||
%service_del_postun vboxadd-service.service
|
||||
%service_del_postun vboxclient.service
|
||||
%service_del_postun vboxservice.service
|
||||
%service_del_postun vboxadd-service.service vboxclient.service vboxservice.service
|
||||
|
||||
%postun websrv
|
||||
%restart_on_update vboxweb-service
|
||||
%service_del_postun vboxweb-service.service
|
||||
#
|
||||
#######################################################
|
||||
|
Loading…
Reference in New Issue
Block a user