Changeset 32549 in vbox
- Timestamp:
- Sep 16, 2010 11:30:20 AM (14 years ago)
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/checkinstall.sh
r32388 r32549 17 17 # 18 18 19 infoprint() 20 { 21 echo 1>&2 "$1" 22 } 23 24 errorprint() 25 { 26 echo 1>&2 "## $1" 27 } 28 19 29 abort_error() 20 30 { 21 echo "## Please close all VirtualBox processes and re-run this installer." 31 errorprint "Please close all VirtualBox processes and re-run this installer." 32 errorprint "Note: It can take up to 10 seconds for all VirtualBox & related processes to close." 22 33 exit 1 23 34 } … … 28 39 fi 29 40 30 # Check if VBoxSVC is currently running31 VBOXSVC_PID=`ps -eo pid,fname | grep VBoxSVC | grep -v grep | awk '{ print $1 }'`32 if test ! -z "$VBOXSVC_PID" && test "$VBOXSVC_PID" -ge 0; then33 echo "## VirtualBox's VBoxSVC (pid $VBOXSVC_PID) still appears to be running."34 abort_error35 fi36 37 41 # Check if the Zone Access service is holding open vboxdrv, if so stop & remove it 38 42 servicefound=`svcs -H "svc:/application/virtualbox/zoneaccess" 2> /dev/null | grep '^online'` 39 43 if test ! -z "$servicefound"; then 40 echo "##VirtualBox's zone access service appears to still be running."41 echo "##Halting & removing zone access service..."44 infoprint "VirtualBox's zone access service appears to still be running." 45 infoprint "Halting & removing zone access service..." 42 46 /usr/sbin/svcadm disable -s svc:/application/virtualbox/zoneaccess 43 47 # Don't delete the service, handled by manifest class action … … 48 52 servicefound=`svcs -H "svc:/application/virtualbox/webservice" 2> /dev/null | grep '^online'` 49 53 if test ! -z "$servicefound"; then 50 echo "##VirtualBox web service appears to still be running."51 echo "##Halting & removing webservice..."54 infoprint "VirtualBox web service appears to still be running." 55 infoprint "Halting & removing webservice..." 52 56 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice 53 57 # Don't delete the service, handled by manifest class action 54 58 # /usr/sbin/svccfg delete svc:/application/virtualbox/webservice 59 fi 60 61 # Check if VBoxSVC is currently running 62 VBOXSVC_PID=`ps -eo pid,fname | grep VBoxSVC | grep -v grep | awk '{ print $1 }'` 63 if test ! -z "$VBOXSVC_PID" && test "$VBOXSVC_PID" -ge 0; then 64 errorprint "VirtualBox's VBoxSVC (pid $VBOXSVC_PID) still appears to be running." 65 abort_error 66 fi 67 68 # Check if VBoxNetDHCP is currently running 69 VBOXNETDHCP_PID=`ps -eo pid,fname | grep VBoxNetDHCP | grep -v grep | awk '{ print $1 }'` 70 if test ! -z "VBOXNETDHCP_PID" && test "VBOXNETDHCP_PID" -ge 0; then 71 errorprint "VirtualBox's VBoxNetDHCP (pid $VBOXNETDHCP_PID) still appears to be running." 72 abort_error 55 73 fi 56 74 … … 60 78 vboxnetup=`$BIN_IFCONFIG vboxnet0 >/dev/null 2>&1` 61 79 if test "$?" -eq 0; then 62 echo "##VirtualBox NetAdapter is still plumbed"63 echo "##Trying to remove old NetAdapter..."80 infoprint "VirtualBox NetAdapter is still plumbed" 81 infoprint "Trying to remove old NetAdapter..." 64 82 $BIN_IFCONFIG vboxnet0 unplumb 65 83 if test "$?" -ne 0; then 66 e cho "##VirtualBox NetAdapter 'vboxnet0' couldn't be unplumbed (probably in use)."84 errorprint "VirtualBox NetAdapter 'vboxnet0' couldn't be unplumbed (probably in use)." 67 85 abort_error 68 86 fi … … 70 88 vboxnetup=`$BIN_IFCONFIG vboxnet0 inet6 >/dev/null 2>&1` 71 89 if test "$?" -eq 0; then 72 echo "##VirtualBox NetAdapter (Ipv6) is still plumbed"73 echo "##Trying to remove old NetAdapter..."90 infoprint "VirtualBox NetAdapter (Ipv6) is still plumbed" 91 infoprint "Trying to remove old NetAdapter..." 74 92 $BIN_IFCONFIG vboxnet0 inet6 unplumb 75 93 if test "$?" -ne 0; then 76 e cho "##VirtualBox NetAdapter 'vboxnet0' IPv6 couldn't be unplumbed (probably in use)."94 errorprint "VirtualBox NetAdapter 'vboxnet0' IPv6 couldn't be unplumbed (probably in use)." 77 95 abort_error 78 96 fi -
trunk/src/VBox/Installer/solaris/vboxconfig.sh
r32431 r32549 42 42 BIN_SVCS=/usr/bin/svcs 43 43 BIN_ID=/usr/bin/id 44 BIN_PKILL=/usr/bin/pkill 44 45 45 46 # "vboxdrv" is also used in sed lines here (change those as well if it ever changes) … … 106 107 { 107 108 helpprint "VirtualBox Configuration Script" 108 helpprint "usage: $0 operation[options]"109 helpprint "usage: $0 <operation> [options]" 109 110 helpprint 110 helpprint " operationmust be one of the following:"111 helpprint " --postinstall 112 helpprint " --preremove 113 helpprint " --installdrivers 114 helpprint " --removedrivers 115 helpprint " --setupdrivers Set up drivers, reloads anyexisting drivers"111 helpprint "<operation> must be one of the following:" 112 helpprint " --postinstall Perform full post installation procedure" 113 helpprint " --preremove Perform full pre remove procedure" 114 helpprint " --installdrivers Only install the drivers" 115 helpprint " --removedrivers Only remove the drivers" 116 helpprint " --setupdrivers Setup drivers, reloads existing drivers" 116 117 helpprint 117 118 helpprint "[options] are one or more of the following:" 118 helpprint " --silent Silent mode" 119 helpprint " --fatal Make failures fatal, don't continue" 120 helpprint " --ips An IPS package installation" 121 helpprint " --altkerndir Use /usr/kernel/drv as the driver directory" 119 helpprint " --silent Silent mode" 120 helpprint " --fatal Don't continue on failure (required for postinstall)" 121 helpprint " --ips This is an IPS package postinstall/preremove" 122 helpprint " --altkerndir Use /usr/kernel/drv as the driver directory" 123 helpprint 122 124 } 123 125 … … 193 195 if test ! -x "$BIN_IFCONFIG"; then 194 196 BIN_IFCONFIG=`find_bin_path "$BIN_IFCONFIG"` 197 fi 198 199 if test ! -x "$BIN_PKILL"; then 200 BIN_PKILL=`find_bin_path "$BIN_PKILL"` 195 201 fi 196 202 } … … 532 538 } 533 539 534 # remove_ all([fatal])540 # remove_drivers([fatal]) 535 541 # failure: depends on [fatal] 536 542 remove_drivers() … … 627 633 fi 628 634 return 1 635 } 636 637 # stop_process(processname) 638 # failure: depends on [fatal] 639 stop_process() 640 { 641 if test -z "$1"; then 642 errorprint "missing argument to stop_process()" 643 exit 1 644 fi 645 646 procname=$1 647 procpid=`ps -eo pid,fname | grep $PROC_NAME | grep -v grep | awk '{ print $1 }'` 648 if test ! -z "procpid" && test "procpid" -ge 0; then 649 $BIN_PKILL "$procname" 650 sleep 2 651 procpid=`ps -eo pid,fname | grep $PROC_NAME | grep -v grep | awk '{ print $1 }'` 652 if test ! -z "procpid" && test "procpid" -ge 0; then 653 subprint "Terminating: $procname ...FAILED!" 654 if test "$fatal" = "$FATALOP"; then 655 exit 1 656 fi 657 else 658 subprint "Terminated: $procname" 659 fi 660 fi 629 661 } 630 662 … … 695 727 inst=`expr $inst + 1` 696 728 done 729 730 # Stop our other daemons, non-fatal 731 stop_process VBoxSVC 732 stop_process VBoxNetDHCP 697 733 } 698 734
Note:
See TracChangeset
for help on using the changeset viewer.