VirtualBox

Changeset 32487 in vbox


Ignore:
Timestamp:
Sep 14, 2010 2:32:55 PM (14 years ago)
Author:
vboxsync
Message:

Linux installer: vboxweb-service updates

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec

    r32251 r32487  
    261261%endif
    262262%if %{?rpm_suse:1}%{!?rpm_suse:0}
    263 %{fillup_and_insserv -fy vboxdrv}
    264 %{fillup_and_insserv -fy vboxweb-service}
     263%{fillup_and_insserv -fy vboxdrv vboxweb-service}
    265264%endif
    266265%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
     
    311310
    312311%preun
     312%if %{?rpm_suse:1}%{!?rpm_suse:0}
     313%stop_on_removal vboxweb-service
     314%endif
     315%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
     316%_preun_service vboxweb-service
     317%endif
     318%if %{?rpm_redhat:1}%{!?rpm_redhat:0}
     319if [ "$1" = 0 ]; then
     320  /sbin/service vboxweb-service stop > /dev/null
     321  /sbin/chkconfig --del vboxweb-service
     322fi
     323%endif
    313324# check for active VMs
    314325VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
    315326if [ -n "$VBOXSVC_PID" ]; then
    316   # try graceful termination; terminate the webservice first
    317   /etc/init.d/vboxweb-service stop || true
     327  kill -USR1 $VBOXSVC_PID
    318328  sleep 1
    319329  if pidof VBoxSVC > /dev/null 2>&1; then
     
    324334  fi
    325335fi
    326 
    327 %if %{?rpm_suse:1}%{!?rpm_suse:0}
    328 %stop_on_removal vboxweb-service
     336%if %{?rpm_suse:1}%{!?rpm_suse:0}
    329337%stop_on_removal vboxdrv
    330338%endif
    331339%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
    332 %_preun_service vboxweb-service
    333340%_preun_service vboxdrv
    334341%endif
     
    337344  /sbin/service vboxdrv stop > /dev/null
    338345  /sbin/chkconfig --del vboxdrv
    339   /sbin/service vboxweb-service stop > /dev/null
    340   /sbin/chkconfig --del vboxweb-service
    341346%endif
    342347  rm -f /etc/udev/rules.d/10-vboxdrv.rules
  • trunk/src/VBox/Installer/linux/vboxdrv.sh.in

    r32183 r32487  
    161161start()
    162162{
    163     begin_msg "Starting VirtualBox kernel module"
     163    begin_msg "Starting VirtualBox kernel modules"
    164164    if ! running vboxdrv; then
    165165        if ! rm -f $DEVICE; then
     
    213213stop()
    214214{
    215     begin_msg "Stopping VirtualBox kernel module"
     215    begin_msg "Stopping VirtualBox kernel modules"
    216216    if running vboxnetadp; then
    217217        if ! rmmod vboxnetadp 2>/dev/null; then
     
    307307    if ! $DODKMS install >> $LOG; then
    308308      fail_msg "Failed, trying without DKMS"
    309       begin_msg "Recompiling VirtualBox kernel module"
     309      begin_msg "Recompiling VirtualBox kernel modules"
    310310      if ! $BUILDVBOXDRV \
    311311          --save-module-symvers /tmp/vboxdrv-Module.symvers \
  • trunk/src/VBox/Installer/linux/vboxweb-service.sh.in

    r32473 r32487  
    2828PATH=$PATH:/bin:/sbin:/usr/sbin
    2929DEBIAN=%DEBIAN%
     30NOLSB=%NOLSB%
    3031
    3132[ -f /lib/lsb/init-functions ] || NOLSB=yes
     
    9192    if [ -n "$NOLSB" ]; then
    9293        start_daemon() {
    93             daemon --user $1 $2 $3
     94            usr="$1"
     95            shift
     96            daemon --user $usr $@
    9497        }
    9598        fail_msg() {
     
    112115        usr="$1"
    113116        shift
    114         startproc -u "$usr" $@
     117        su - $usr -c "$*"
    115118    }
    116119    if [ -n "$NOLSB" ]; then
     
    135138        bin="$1"
    136139        shift
    137         start-stop-daemon --chuid "$usr" --start --exec "$bin" -- $@
     140        start-stop-daemon --chuid $usr --start --exec $bin -- $@
    138141    }
    139142    killproc() {
     
    160163        bin="$1"
    161164        shift
    162         start-stop-daemon --chuid "$usr" --start --exec "$bin" -- $@
     165        start-stop-daemon --chuid $usr --start --exec $bin -- $@
    163166    }
    164167    killproc() {
     
    185188    . /etc/rc.d/functions
    186189    start_daemon() {
    187         $@
     190        usr="$1"
     191        shift
     192        su - $usr -c "$*"
    188193        test $? -eq 0 && add_daemon rc.`basename $2`
    189194    }
     
    222227    fi
    223228    start_daemon() {
    224         # runuser
    225         fail_msg "not supported on Slackware!"
    226         return
    227         $2 $3
     229        usr="$1"
     230        shift
     231        su - $usr -c "$*"
    228232    }
    229233fi
     
    243247    fi
    244248    start_daemon() {
    245         # runuser
    246         fail_msg "not supported on LFS!"
    247         return
    248         loadproc $2 $3
     249        usr="$1"
     250        shift
     251        su - $usr -c "$*"
    249252    }
    250253    status() {
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