Changeset 42469 in vbox for trunk/src/VBox/Additions/solaris/Installer/postinstall.sh
- Timestamp:
- Jul 31, 2012 6:58:12 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/Installer/postinstall.sh
r42457 r42469 69 69 uncompress_file "$1" "vboxvideo_drv_70.so" 70 70 uncompress_file "$1" "vboxvideo_drv_71.so" 71 72 # VBox Xorg Mouse drivers73 uncompress_file "$1" "vboxmouse_drv_13.so"74 uncompress_file "$1" "vboxmouse_drv_14.so"75 uncompress_file "$1" "vboxmouse_drv_15.so"76 uncompress_file "$1" "vboxmouse_drv_16.so"77 uncompress_file "$1" "vboxmouse_drv_17.so"78 uncompress_file "$1" "vboxmouse_drv_18.so"79 uncompress_file "$1" "vboxmouse_drv_19.so"80 uncompress_file "$1" "vboxmouse_drv_110.so"81 uncompress_file "$1" "vboxmouse_drv_111.so"82 uncompress_file "$1" "vboxmouse_drv_112.so"83 uncompress_file "$1" "vboxmouse_drv_70.so"84 uncompress_file "$1" "vboxmouse_drv_71.so"85 71 } 86 72 … … 158 144 fi 159 145 160 vboxmouse_src=""161 146 vboxvideo_src="" 162 147 163 148 case "$xorgversion" in 164 149 1.3.* ) 165 vboxmouse_src="vboxmouse_drv_13.so"166 150 vboxvideo_src="vboxvideo_drv_13.so" 167 151 ;; 168 152 1.4.* ) 169 vboxmouse_src="vboxmouse_drv_14.so"170 153 vboxvideo_src="vboxvideo_drv_14.so" 171 154 ;; 172 155 1.5.99 | 1.6.* ) 173 vboxmouse_src="vboxmouse_drv_16.so"174 156 vboxvideo_src="vboxvideo_drv_16.so" 175 157 ;; 176 158 1.5.* ) 177 vboxmouse_src="vboxmouse_drv_15.so"178 159 vboxvideo_src="vboxvideo_drv_15.so" 179 160 ;; 180 161 1.7.*) 181 vboxmouse_src="vboxmouse_drv_17.so"182 162 vboxvideo_src="vboxvideo_drv_17.so" 183 163 ;; 184 164 1.8.*) 185 vboxmouse_src="vboxmouse_drv_18.so"186 165 vboxvideo_src="vboxvideo_drv_18.so" 187 166 ;; 188 167 1.9.*) 189 vboxmouse_src="vboxmouse_drv_19.so"190 168 vboxvideo_src="vboxvideo_drv_19.so" 191 169 ;; 192 170 1.10.*) 193 vboxmouse_src="vboxmouse_drv_110.so"194 171 vboxvideo_src="vboxvideo_drv_110.so" 195 172 ;; 196 173 1.11.*) 197 vboxmouse_src="vboxmouse_drv_111.so"198 174 vboxvideo_src="vboxvideo_drv_111.so" 199 175 ;; 200 176 1.12.*) 201 vboxmouse_src="vboxmouse_drv_112.so"202 177 vboxvideo_src="vboxvideo_drv_112.so" 203 178 ;; 204 179 7.1.* | *7.2.* ) 205 vboxmouse_src="vboxmouse_drv_71.so"206 180 vboxvideo_src="vboxvideo_drv_71.so" 207 181 ;; 208 182 6.9.* | 7.0.* ) 209 vboxmouse_src="vboxmouse_drv_70.so"210 183 vboxvideo_src="vboxvideo_drv_70.so" 211 184 ;; … … 213 186 214 187 retval=0 215 if test -z "$vbox mouse_src"; then188 if test -z "$vboxvideo_src"; then 216 189 echo "*** Unknown version of the X Window System installed." 217 190 echo "*** Failed to install the VirtualBox X Window System drivers." … … 220 193 retval=2 221 194 else 222 echo "Installing mouse and video driversfor X.Org $xorgversion..."195 echo "Installing video driver for X.Org $xorgversion..." 223 196 224 197 # Determine destination paths (snv_130 and above use "/usr/lib/xorg", older use "/usr/X11/lib" 225 vboxmouse32_dest_base="/usr/lib/xorg/modules/input"226 if test ! -d $vboxmouse32_dest_base; then227 vboxmouse32_dest_base="/usr/X11/lib/modules/input"228 fi229 198 vboxvideo32_dest_base="/usr/lib/xorg/modules/drivers" 230 199 if test ! -d $vboxvideo32_dest_base; then … … 232 201 fi 233 202 234 vboxmouse64_dest_base=$vboxmouse32_dest_base/$solaris64dir235 203 vboxvideo64_dest_base=$vboxvideo32_dest_base/$solaris64dir 236 204 237 205 # snv_163 drops 32-bit support completely, and uses 32-bit locations for the 64-bit stuff. Ugly. 238 # We try to detect this by looking at bitness of " mouse_drv.so", and adjust our destination paths accordingly.206 # We try to detect this by looking at bitness of "vesa_drv.so", and adjust our destination paths accordingly. 239 207 # We do not rely on using Xorg -version's ABI output because some builds (snv_162 iirc) have 64-bit ABI with 240 208 # 32-bit file locations. 241 if test -f "$vbox mouse32_dest_base/mouse_drv.so"; then242 bitsize=`file "$vbox mouse32_dest_base/mouse_drv.so" | grep -i "32-bit"`209 if test -f "$vboxvideo32_dest_base/vesa_drv.so"; then 210 bitsize=`file "$vboxvideo32_dest_base/vesa_drv.so" | grep -i "32-bit"` 243 211 skip32="no" 244 212 else 245 echo "* Warning mouse_drv.so missing. Assuming Xorg ABI is 64-bit..."213 echo "* Warning vesa_drv.so missing. Assuming Xorg ABI is 64-bit..." 246 214 fi 247 215 248 216 if test -z "$bitsize"; then 249 217 skip32="yes" 250 vboxmouse64_dest_base=$vboxmouse32_dest_base251 218 vboxvideo64_dest_base=$vboxvideo32_dest_base 252 219 fi 253 220 254 221 # Make sure destination path exists 255 if test ! -d $vbox mouse32_dest_base || test ! -d $vboxvideo32_dest_base || test ! -d $vboxmouse64_dest_base || test ! -d $vboxvideo64_dest_base; then256 echo "*** Missing destination paths for mouse or video modules. Aborting."257 echo "*** Failed to install the VirtualBox X Window System driver s."222 if test ! -d $vboxvideo64_dest_base; then 223 echo "*** Missing destination paths for video module. Aborting." 224 echo "*** Failed to install the VirtualBox X Window System driver." 258 225 259 226 # Exit as partially failed installation … … 261 228 else 262 229 # 32-bit x11 drivers 263 if test "$skip32" = "no" && test -f "$vboxadditions32_path/$vboxmouse_src"; then 264 vboxmouse_dest="$vboxmouse32_dest_base/vboxmouse_drv.so" 230 if test "$skip32" = "no" && test -f "$vboxadditions32_path/$vboxvideo_src"; then 265 231 vboxvideo_dest="$vboxvideo32_dest_base/vboxvideo_drv.so" 266 /usr/sbin/installf -c none $PKGINST "$vboxmouse_dest" f267 232 /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f 268 cp "$vboxadditions32_path/$vboxmouse_src" "$vboxmouse_dest"269 233 cp "$vboxadditions32_path/$vboxvideo_src" "$vboxvideo_dest" 270 234 271 235 # Removing redundant names from pkg and files from disk 272 /usr/sbin/removef $PKGINST $vboxadditions32_path/vboxmouse_drv_* 1>/dev/null273 236 /usr/sbin/removef $PKGINST $vboxadditions32_path/vboxvideo_drv_* 1>/dev/null 274 rm -f $vboxadditions32_path/vboxmouse_drv_*275 237 rm -f $vboxadditions32_path/vboxvideo_drv_* 276 238 fi 277 239 278 240 # 64-bit x11 drivers 279 if test -f "$vboxadditions64_path/$vboxmouse_src"; then 280 vboxmouse_dest="$vboxmouse64_dest_base/vboxmouse_drv.so" 241 if test -f "$vboxadditions64_path/$vboxvideo_src"; then 281 242 vboxvideo_dest="$vboxvideo64_dest_base/vboxvideo_drv.so" 282 /usr/sbin/installf -c none $PKGINST "$vboxmouse_dest" f283 243 /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f 284 cp "$vboxadditions64_path/$vboxmouse_src" "$vboxmouse_dest"285 244 cp "$vboxadditions64_path/$vboxvideo_src" "$vboxvideo_dest" 286 245 287 246 # Removing redundant names from pkg and files from disk 288 /usr/sbin/removef $PKGINST $vboxadditions64_path/vboxmouse_drv_* 1>/dev/null289 247 /usr/sbin/removef $PKGINST $vboxadditions64_path/vboxvideo_drv_* 1>/dev/null 290 rm -f $vboxadditions64_path/vboxmouse_drv_*291 248 rm -f $vboxadditions64_path/vboxvideo_drv_* 292 249 fi … … 313 270 fi 314 271 315 # Adjust xorg.conf with mouse andvideo driver sections272 # Adjust xorg.conf with video driver sections 316 273 $vboxadditions_path/x11config15sol.pl 317 274 fi … … 411 368 /usr/sbin/devfsadm -i vboxguest 412 369 413 # Setup VBoxService & start the serviceautomatically414 echo "Configuring service (this might take a while)..."370 # Setup VBoxService and vboxmslnk and start the services automatically 371 echo "Configuring services (this might take a while)..." 415 372 cmax=32 416 373 cslept=0 … … 422 379 # 1 second intervals to see if our service has been successfully imported and timeout after 'cmax' seconds. 423 380 /usr/sbin/svcadm restart svc:system/manifest-import:default 424 is_import=`/usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1` 381 ## @todo why do we redirect to /dev/null and then save the output? 382 is_import=`/usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1 && /usr/bin/svcs virtualbox/vboxmslnk >/dev/null 2>&1` 425 383 while test $? -ne 0; 426 384 do … … 431 389 break 432 390 fi 433 is_import=`/usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1 `391 is_import=`/usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1 && /usr/bin/svcs virtualbox/vboxmslnk >/dev/null 2>&1` 434 392 done 435 393 if test "$success" -eq 0; then 436 echo "Enabling service ..."394 echo "Enabling services..." 437 395 /usr/sbin/svcadm enable -s virtualbox/vboxservice 396 /usr/sbin/svcadm enable -s virtualbox/vboxmslnk 438 397 else 439 echo "## VBoxService import failed."398 echo "## Service import failed." 440 399 echo "## See /var/svc/log/system-manifest-import:default.log for details." 441 400 # Exit as partially failed installation
Note:
See TracChangeset
for help on using the changeset viewer.