Changeset 56147 in vbox for trunk/src/VBox/Installer
- Timestamp:
- May 29, 2015 11:36:27 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/checkinstall.sh
r56123 r56147 64 64 } 65 65 66 # nothing to check for remote install 66 disable_service() 67 { 68 if test -z "$1" || test -z "$2"; then 69 errorprint "Missing argument to disable_service" 70 return 1 71 fi 72 servicefound=`$BIN_SVCS -H "$1" 2> /dev/null | grep '^online'` 73 if test ! -z "$servicefound"; then 74 infoprint "$2 ($1) is still enabled. Disabling..." 75 $BIN_SVCADM disable -s "$1" 76 # Don't delete the service, handled by manifest class action 77 # /usr/sbin/svccfg delete $1 78 fi 79 } 80 81 # 82 # Begin execution 83 # 84 85 # Nothing to check for remote install 67 86 REMOTE_INST=0 68 87 if test "x${PKG_INSTALL_ROOT:=/}" != "x/"; then … … 71 90 fi 72 91 73 # nothing to check for non-global zones92 # Nothing to check for non-global zones 74 93 currentzone=`zonename` 75 94 if test "$currentzone" != "global"; then 76 95 exit 0 77 96 fi 78 79 80 infoprint "Checking package dependencies..."81 97 82 98 PKG_MISSING_IPS="" … … 84 100 BIN_PKGINFO=`which pkginfo 2> /dev/null` 85 101 BIN_PKG=`which pkg 2> /dev/null` 102 BIN_SVCS=`which svcs 2> /dev/null` 103 BIN_SVCADM=/usr/sbin/svcadm 104 105 # Check if our binaries are fine 106 if test ! -x "$BIN_SVCS"; then 107 errorprint "Missing or non-executable binary: svcs ($BIN_SVCS)." 108 exit 1 109 fi 110 if test ! -x "$BIN_SVCADM"; then 111 errorprint "Missing or non-executable binary: svcadm ($BIN_SVCADM)." 112 exit 1 113 fi 114 115 infoprint "Checking package dependencies..." 86 116 87 117 if test -x "$BIN_PKG"; then … … 117 147 fi 118 148 119 # nothing more to do for remote installs149 # Nothing more to do for remote installs 120 150 if test "$REMOTE_INST" -eq 1; then 121 151 exit 0 122 152 fi 123 153 124 # Check if the Zone Access service is holding open vboxdrv, if so stop & remove it 125 servicefound=`svcs -H "svc:/application/virtualbox/zoneaccess" 2> /dev/null | grep '^online'` 126 if test ! -z "$servicefound"; then 127 infoprint "VirtualBox zone access service appears to still be running." 128 infoprint "Halting & removing zone access service..." 129 /usr/sbin/svcadm disable -s svc:/application/virtualbox/zoneaccess 130 # Don't delete the service, handled by manifest class action 131 # /usr/sbin/svccfg delete svc:/application/virtualbox/zoneaccess 132 fi 133 134 # Check if the Web service is running, if so stop & remove it 135 servicefound=`svcs -H "svc:/application/virtualbox/webservice" 2> /dev/null | grep '^online'` 136 if test ! -z "$servicefound"; then 137 infoprint "VirtualBox web service appears to still be running." 138 infoprint "Halting & removing webservice..." 139 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice 140 # Don't delete the service, handled by manifest class action 141 # /usr/sbin/svccfg delete svc:/application/virtualbox/webservice 142 fi 143 144 # Check if the autostart service is running, if so stop & remove it 145 servicefound=`svcs -H "svc:/application/virtualbox/autostart" 2> /dev/null | grep '^online'` 146 if test ! -z "$servicefound"; then 147 infoprint "VirtualBox autostart service appears to still be running." 148 infoprint "Halting & removing autostart service..." 149 /usr/sbin/svcadm disable -s svc:/application/virtualbox/autostart 150 fi 154 # Check & disable running services 155 disable_service "svc:/application/virtualbox/zoneaccess" "VirtualBox zone access service" 156 disable_service "svc:/application/virtualbox/webservice" "VirtualBox web service" 157 disable_service "svc:/application/virtualbox/autostart" "VirtualBox auto-start service" 158 disable_service "svc:/application/virtualbox/balloonctrl" "VirtualBox balloon-control service" 151 159 152 160 # Check if VBoxSVC is currently running … … 203 211 # follow up fixes. 204 212 for i in 1 2 3 4 5 6 7 8 9 10; do 205 svcs -H "svc:/application/virtualbox/autostart" >/dev/null 2>&1 || 206 svcs -H "svc:/application/virtualbox/webservice" >/dev/null 2>&1 || 207 svcs -H "svc:/application/virtualbox/zoneaccess" >/dev/null 2>&1 || break 213 $BIN_SVCS -H "svc:/application/virtualbox/autostart" >/dev/null 2>&1 || 214 $BIN_SVCS -H "svc:/application/virtualbox/webservice" >/dev/null 2>&1 || 215 $BIN_SVCS -H "svc:/application/virtualbox/zoneaccess" >/dev/null 2>&1 || 216 $BIN_SVCS -H "svc:/application/virtualbox/balloonctrl" >/dev/null 2>&1 || break 208 217 if test "${i}" = "1"; then 209 218 printf "Waiting for services from previous installation to be removed." 210 219 elif test "${i}" = "10"; then 211 printf "\nWarning!!! Some service(s) still appears to not be removed completely!"220 printf "\nWarning!!! Some service(s) still appears to be present" 212 221 else 213 222 printf "."
Note:
See TracChangeset
for help on using the changeset viewer.