VirtualBox

Changeset 32543 in vbox for trunk/debian


Ignore:
Timestamp:
Sep 16, 2010 9:42:45 AM (14 years ago)
Author:
vboxsync
Message:

Linux installer: sync deb

Location:
trunk/debian
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/postinst.in

    r32517 r32543  
    176176  if [ -x "/etc/init.d/vboxweb-service" ]; then
    177177    update-rc.d vboxweb-service defaults >/dev/null
    178 #    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
    179 #        invoke-rc.d vboxweb-service start || exit $?
    180 #    else
    181 #        /etc/init.d/vboxweb-service start || exit $?
    182 #    fi
     178    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
     179        invoke-rc.d vboxweb-service start || exit $?
     180    else
     181        /etc/init.d/vboxweb-service start || exit $?
     182    fi
    183183  fi
    184184
  • trunk/debian/preinst.in

    r31999 r32543  
    1 #!/bin/bash -e
     1#!/bin/bash
    22#
    33# Copyright (C) 2006-2010 Oracle Corporation
     
    2727
    2828  # check for active VMs
    29   if pidof VBoxSVC > /dev/null 2>&1; then
    30     db_fset virtualbox/old-running seen false || true
    31     db_input critical virtualbox/old-running || true
    32     db_go || true
    33     exit 1
     29  VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null || true`
     30  if [ -n "$VBOXSVC_PID" ]; then
     31    if [ -f /etc/init.d/vboxweb-service ]; then
     32      # try graceful termination; terminate the webservice first
     33      if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
     34        invoke-rc.d vboxweb-service stop || true
     35      else
     36        /etc/init.d/vboxweb-service stop || true
     37      fi
     38      kill -USR1 $VBOXSVC_PID
     39    fi
     40    sleep 1
     41    if pidof VBoxSVC > /dev/null 2>&1; then
     42      db_fset virtualbox/old-running seen false || true
     43      db_input critical virtualbox/old-running || true
     44      db_go || true
     45      exit 1
     46    fi
    3447  fi
    3548
  • trunk/debian/prerm.in

    r32183 r32543  
    3333
    3434  # check for active VMs
    35   if pidof VBoxSVC > /dev/null 2>&1; then
    36     if [ "$1" != "failed-upgrade" ]; then
    37       db_fset virtualbox/old-running seen false || true
    38       db_input critical virtualbox/old-running || true
    39       db_go || true
     35  VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null`
     36  if [ -n "$VBOXSVC_PID" ]; then
     37    # try graceful termination; terminate the webservice first
     38    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
     39      invoke-rc.d vboxweb-service stop || true
     40    else
     41      /etc/init.d/vboxweb-service stop || true
    4042    fi
    41     exit 1
     43    kill -USR1 $VBOXSVC_PID
     44    sleep 1
     45    if pidof VBoxSVC > /dev/null 2>&1; then
     46      if [ "$1" != "failed-upgrade" ]; then
     47        db_fset virtualbox/old-running seen false || true
     48        db_input critical virtualbox/old-running || true
     49        db_go || true
     50      fi
     51      exit 1
     52    fi
    4253  fi
    4354fi
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