VirtualBox

Changeset 57809 in vbox for trunk/src/VBox/Installer/linux


Ignore:
Timestamp:
Sep 17, 2015 4:12:55 PM (9 years ago)
Author:
vboxsync
Message:

Reverted bad commit r102754.

Location:
trunk/src/VBox/Installer/linux
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/Makefile.kmk

    r57808 r57809  
    210210          ExtensionPacks/VNC/ExtPack-license.rtf \
    211211          ExtensionPacks/VNC/ExtPack-license.txt,) \
    212         postinst-common.sh \
    213         prerm-common.sh \
    214         routines.sh \
    215212        VBoxSysInfo.sh \
    216213        vboxautostart-service.sh \
  • trunk/src/VBox/Installer/linux/install.sh

    r57808 r57809  
    348348    fi
    349349
    350     cp uninstall.sh $INSTALLATION_DIR
     350    cp uninstall.sh routines.sh $INSTALLATION_DIR
     351    echo "routines.sh" >> $CONFIG_DIR/$CONFIG_FILES
    351352    echo "uninstall.sh" >> $CONFIG_DIR/$CONFIG_FILES
    352353
  • trunk/src/VBox/Installer/linux/prerm-common.sh

    r57808 r57809  
    5050remove_init_script vboxweb-service
    5151# Stop kernel module and uninstall runlevel script
    52 stop_init_script vboxdrv 2>/dev/null
     52stop_init_script vboxdrv
    5353delrunlevel vboxdrv
    5454remove_init_script vboxdrv
  • trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec

    r57808 r57809  
    171171  mv accessible $RPM_BUILD_ROOT/usr/lib/virtualbox
    172172fi
    173 mv vboxdrv.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    174 ln -sf /usr/lib/virtualbox/vboxdrv.sh $RPM_BUILD_ROOT/sbin/rcvboxdrv
    175 mv vboxballoonctrl-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    176 ln -sf /usr/lib/virtualbox/vboxballoonctrl-service.sh $RPM_BUILD_ROOT/sbin/rcvboxballoonctrl-service
    177 mv vboxautostart-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    178 ln -sf /usr/lib/virtualbox/vboxautostart-service.sh $RPM_BUILD_ROOT/sbin/rcvboxautostart-service
    179 mv vboxweb-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    180 ln -sf /usr/lib/virtualbox/vboxweb-service.sh $RPM_BUILD_ROOT/sbin/rcvboxweb-service
    181 mv postinst-common.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    182 mv prerm-common.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    183 mv routines.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
     173install -D -m 755 vboxdrv.init $RPM_BUILD_ROOT%{_initrddir}/vboxdrv
     174ln -sf %{_initrddir}/vboxdrv $RPM_BUILD_ROOT/sbin/rcvboxdrv
     175install -D -m 755 vboxballoonctrl-service.init $RPM_BUILD_ROOT%{_initrddir}/vboxballoonctrl-service
     176install -D -m 755 vboxautostart-service.init $RPM_BUILD_ROOT%{_initrddir}/vboxautostart-service
     177install -D -m 755 vboxweb-service.init $RPM_BUILD_ROOT%{_initrddir}/vboxweb-service
     178%if %{?rpm_suse:1}%{!?rpm_suse:0}
     179ln -sf ../etc/init.d/vboxballoonctrl-service $RPM_BUILD_ROOT/sbin/rcvboxballoonctrl-service
     180ln -sf ../etc/init.d/vboxautostart-service $RPM_BUILD_ROOT/sbin/rcvboxautostart-service
     181ln -sf ../etc/init.d/vboxweb-service $RPM_BUILD_ROOT/sbin/rcvboxweb-service
     182%endif
    184183ln -s VBox $RPM_BUILD_ROOT/usr/bin/VirtualBox
    185184ln -s VBox $RPM_BUILD_ROOT/usr/bin/virtualbox
     
    205204
    206205%pre
    207 set -x
    208 echo Running pre...
    209206# defaults
    210207[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
     208
     209# check for active VMs of the installed (old) package
     210VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
     211if [ -n "$VBOXSVC_PID" ]; then
     212  # executed before the new package is installed!
     213  if [ -f /etc/init.d/vboxballoonctrl-service ]; then
     214    # try graceful termination; terminate the balloon control service first
     215    /etc/init.d/vboxballoonctrl-service stop 2>/dev/null || true
     216  fi
     217  if [ -f /etc/init.d/vboxautostart-service ]; then
     218    # try graceful termination; terminate the autostart service first
     219    /etc/init.d/vboxautostart-service stop 2>/dev/null || true
     220  fi
     221  if [ -f /etc/init.d/vboxweb-service ]; then
     222    # try graceful termination; terminate the webservice first
     223    /etc/init.d/vboxweb-service stop 2>/dev/null || true
     224  fi
     225  # ask the daemon to terminate immediately
     226  kill -USR1 $VBOXSVC_PID
     227  sleep 1
     228  if pidof VBoxSVC > /dev/null 2>&1; then
     229    echo "A copy of VirtualBox is currently running.  Please close it and try again."
     230    echo "Please note that it can take up to ten seconds for VirtualBox (in particular"
     231    echo "the VBoxSVC daemon) to finish running."
     232    exit 1
     233  fi
     234fi
    211235
    212236# check for old installation
     
    222246fi
    223247
    224 # check for active VMs of the installed (old) package
    225 # Execute the installed packages pre-uninstaller if present.
    226 /usr/lib/virtualbox/prerm-common.sh 2>/dev/null
    227 # Stop services from older versions without pre-uninstaller.
    228 /etc/init.d/vboxballoonctrl-service stop 2>/dev/null
    229 /etc/init.d/vboxautostart-service stop 2>/dev/null
    230 /etc/init.d/vboxweb-service stop 2>/dev/null
    231 VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
    232 if [ -n "$VBOXSVC_PID" ]; then
    233   # ask the daemon to terminate immediately
    234   kill -USR1 $VBOXSVC_PID
    235   sleep 1
    236   if pidof VBoxSVC > /dev/null 2>&1; then
    237     echo "A copy of VirtualBox is currently running.  Please close it and try again."
    238     echo "Please note that it can take up to ten seconds for VirtualBox (in particular"
    239     echo "the VBoxSVC daemon) to finish running."
    240     exit 1
    241   fi
    242 fi
    243 
    244248# XXX remove old modules from previous versions (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)
    245249if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
     
    252256
    253257%post
    254 set -x
    255 echo Running post...
    256258#include installer-common.sh
    257259
     
    288290# and /dev/vboxdrv and /dev/vboxusb/*/* device nodes
    289291install_device_node_setup root 0600 /usr/share/virtualbox "${usb_group}"
     292%if %{?rpm_redhat:1}%{!?rpm_redhat:0}
     293/sbin/chkconfig --add vboxdrv
     294/sbin/chkconfig --add vboxballoonctrl-service
     295/sbin/chkconfig --add vboxautostart-service
     296/sbin/chkconfig --add vboxweb-service
     297%endif
     298%if %{?rpm_suse:1}%{!?rpm_suse:0}
     299%{fillup_and_insserv -f -y -Y vboxdrv vboxballoonctrl-service vboxautostart-service vboxweb-service}
     300%endif
    290301%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
    291302/sbin/ldconfig
     303%_post_service vboxdrv
     304%_post_service vboxballoonctrl-service
     305%_post_service vboxautostart-service
     306%_post_service vboxweb-service
    292307%update_menus
    293308%endif
     
    320335fi
    321336if [ $BUILD_MODULES -eq 1 ]; then
    322   /sbin/rcvboxdrv setup || true
     337  /etc/init.d/vboxdrv setup || true
    323338else
    324339  if lsmod | grep -q "vboxdrv[^_-]"; then
    325     /sbin/rcvboxdrv stop || true
     340    /etc/init.d/vboxdrv stop || true
    326341  fi
    327342  if [ $REGISTER_MODULES -eq 1 ]; then
     
    331346    fi
    332347  fi
    333 fi
    334 # Install and start the new service scripts.
    335 /usr/lib/virtualbox/prerm-common.sh
    336 /usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox --start > /dev/null
     348  /etc/init.d/vboxdrv start > /dev/null
     349fi
     350/etc/init.d/vboxballoonctrl-service start > /dev/null
     351/etc/init.d/vboxautostart-service start > /dev/null
     352/etc/init.d/vboxweb-service start > /dev/null
    337353
    338354
    339355%preun
    340 set -x
    341 echo Running preun...
    342356# $1==0: remove the last version of the package
    343357# $1==1: install the first time
    344358# $1>=2: upgrade
     359%if %{?rpm_suse:1}%{!?rpm_suse:0}
     360%stop_on_removal vboxballoonctrl-service
     361%stop_on_removal vboxautostart-service
     362%stop_on_removal vboxweb-service
     363%endif
     364%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
     365%_preun_service vboxballoonctrl-service
     366%_preun_service vboxautostart-service
     367%_preun_service vboxweb-service
     368%endif
     369%if %{?rpm_redhat:1}%{!?rpm_redhat:0}
    345370if [ "$1" = 0 ]; then
    346   /usr/lib/virtualbox/prerm-common.sh || exit 1
     371  /sbin/service vboxballoonctrl-service stop > /dev/null
     372  /sbin/chkconfig --del vboxballoonctrl-service
     373  /sbin/service vboxautostart-service stop > /dev/null
     374  /sbin/chkconfig --del vboxautostart-service
     375  /sbin/service vboxweb-service stop > /dev/null
     376  /sbin/chkconfig --del vboxweb-service
     377fi
     378%endif
     379
     380if [ "$1" = 0 ]; then
     381  # check for active VMs
     382  VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
     383  if [ -n "$VBOXSVC_PID" ]; then
     384    kill -USR1 $VBOXSVC_PID
     385    sleep 1
     386    if pidof VBoxSVC > /dev/null 2>&1; then
     387      echo "A copy of VirtualBox is currently running.  Please close it and try again."
     388      echo "Please note that it can take up to ten seconds for VirtualBox (in particular"
     389      echo "the VBoxSVC daemon) to finish running."
     390      exit 1
     391    fi
     392  fi
     393fi
     394%if %{?rpm_suse:1}%{!?rpm_suse:0}
     395%stop_on_removal vboxdrv
     396%endif
     397%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
     398%_preun_service vboxdrv
     399%endif
     400if [ "$1" = 0 ]; then
     401%if %{?rpm_redhat:1}%{!?rpm_redhat:0}
     402  /sbin/service vboxdrv stop > /dev/null
     403  /sbin/chkconfig --del vboxdrv
     404%endif
    347405  rm -f /etc/udev/rules.d/60-vboxdrv.rules
    348406  rm -f /etc/vbox/license_agreed
     
    356414
    357415%postun
    358 set -x
    359 echo Running postun...
     416%if %{?rpm_redhat:1}%{!?rpm_redhat:0}
     417if [ "$1" -ge 1 ]; then
     418  /sbin/service vboxdrv restart > /dev/null 2>&1
     419  /sbin/service vboxballoonctrl-service restart > /dev/null 2>&1
     420  /sbin/service vboxautostart-service restart > /dev/null 2>&1
     421  /sbin/service vboxweb-service restart > /dev/null 2>&1
     422fi
     423%endif
     424%if %{?rpm_suse:1}%{!?rpm_suse:0}
     425%restart_on_update vboxdrv vboxballoonctrl-service vboxautostart-service vboxweb-service
     426%insserv_cleanup
     427%endif
    360428%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
    361429/sbin/ldconfig
     
    379447%doc UserManual*.pdf
    380448%doc %{!?is_ose: VirtualBox*.chm}
     449%{_initrddir}/vboxdrv
     450%{_initrddir}/vboxballoonctrl-service
     451%{_initrddir}/vboxautostart-service
     452%{_initrddir}/vboxweb-service
    381453%{?rpm_suse: %{py_sitedir}/*}
    382454%{!?rpm_suse: %{python_sitelib}/*}
    383455/sbin/rcvboxdrv
    384 /sbin/rcvboxballoonctrl-service
    385 /sbin/rcvboxautostart-service
    386 /sbin/rcvboxweb-service
     456%{?rpm_suse: /sbin/rcvboxballoonctrl-service}
     457%{?rpm_suse: /sbin/rcvboxautostart-service}
     458%{?rpm_suse: /sbin/rcvboxweb-service}
    387459/etc/vbox
    388460/usr/bin/*
  • trunk/src/VBox/Installer/linux/rpm/rules

    r57808 r57809  
    249249            -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \
    250250            -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
    251             vboxdrv.sh.in > $(archdir)/vboxdrv.sh
    252         cp vboxballoonctrl-service.sh $(archdir)
    253         cp vboxautostart-service.sh $(archdir)
    254         cp vboxweb-service.sh $(archdir)
     251            vboxdrv.sh.in > $(archdir)/vboxdrv.init
     252        cp vboxballoonctrl-service.sh $(archdir)/vboxballoonctrl-service.init
     253        cp vboxautostart-service.sh $(archdir)/vboxautostart-service.init
     254        cp vboxweb-service.sh $(archdir)/vboxweb-service.init
    255255        cp VBox.sh $(archdir)
    256256        mv rpm/VirtualBox-$(ver) rpm/$(rpmname)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette