Changeset 30667 in vbox for trunk/src/VBox/Installer/solaris
- Timestamp:
- Jul 6, 2010 1:18:28 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63426
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/checkinstall.sh
r28800 r30667 23 23 } 24 24 25 # nothing to check for targetted install 26 if test "x${BASEDIR}" != "x/"; then 27 exit 0 28 fi 25 29 26 30 # Check if VBoxSVC is currently running … … 37 41 echo "## Halting & removing zone access service..." 38 42 /usr/sbin/svcadm disable -s svc:/application/virtualbox/zoneaccess 39 /usr/sbin/svccfg delete svc:/application/virtualbox/zoneaccess 43 # Don't delete the service, handled by manifest class action 44 # /usr/sbin/svccfg delete svc:/application/virtualbox/zoneaccess 40 45 fi 41 46 … … 46 51 echo "## Halting & removing webservice..." 47 52 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice 48 /usr/sbin/svccfg delete svc:/application/virtualbox/webservice 53 # Don't delete the service, handled by manifest class action 54 # /usr/sbin/svccfg delete svc:/application/virtualbox/webservice 49 55 fi 50 56 -
trunk/src/VBox/Installer/solaris/makepackage.sh
r30099 r30667 79 79 } 80 80 81 dirlist_fixup() 82 { 83 "$VBOX_AWK" 'NF == 6 && $1 == "d" && '"$2"' { '"$3"' } { print }' "$1" > "tmp-$1" 84 mv -f "tmp-$1" "$1" 85 } 86 81 87 hardlink_fixup() 82 88 { … … 132 138 find . ! -type d | $VBOX_GGREP -v -E 'prototype|makepackage.sh|vbox.pkginfo|postinstall.sh|checkinstall.sh|preremove.sh|ReadMe.txt|vbox.space|vbox.depend|vbox.copyright|VirtualBoxKern' | pkgproto >> prototype 133 139 134 # Include only opt/VirtualBox and subdirectories as we want uninstall to clean up directory structure as well 135 find . -type d | $VBOX_GGREP -E 'opt/VirtualBox' | pkgproto >> prototype 140 # Include opt/VirtualBox and subdirectories as we want uninstall to clean up directory structure. 141 # Include usr/bin, because remote installs with symlinks when usr/bin/ doesn't need not fail. 142 # Inlcude var/svc for manifest class action script does not create them. 143 find . -type d | $VBOX_GGREP -E 'opt/VirtualBox|usr/bin|var/svc/manifest/application/virtualbox' | pkgproto >> prototype 136 144 137 145 # fix up file permissions (owner/group) … … 166 174 filelist_fixup prototype '$3 == "platform/i86pc/kernel/drv/vboxusb"' '$6 = "sys"' 167 175 filelist_fixup prototype '$3 == "platform/i86pc/kernel/drv/amd64/vboxusb"' '$6 = "sys"' 176 177 # Manifest class action scripts 178 filelist_fixup prototype '$3 == "var/svc/manifest/application/virtualbox/virtualbox-webservice.xml"' '$2 = "manifest";$6 = "sys"' 179 filelist_fixup prototype '$3 == "var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml"' '$2 = "manifest";$6 = "sys"' 180 dirlist_fixup prototype '$3 == "var/svc/manifest/application/virtualbox"' '$6 = "sys"' 168 181 169 182 # hardening requires some executables to be marked setuid. -
trunk/src/VBox/Installer/solaris/pkginstall.sh
r28800 r30667 29 29 fi 30 30 31 /opt/VirtualBox/vboxconfig.sh --preremove --fatal "$ISIPS"31 ${BASEDIR}/opt/VirtualBox/vboxconfig.sh --preremove --fatal "$ISIPS" 32 32 33 33 if test "$?" -eq 0; then 34 34 echo "Installing new ones..." 35 /opt/VirtualBox/vboxconfig.sh --postinstall35 ${BASEDIR}/opt/VirtualBox/vboxconfig.sh --postinstall 36 36 rc=$? 37 37 if test "$rc" -ne 0; then -
trunk/src/VBox/Installer/solaris/postinstall.sh
r28800 r30667 19 19 currentzone=`zonename` 20 20 if test "$currentzone" = "global"; then 21 /opt/VirtualBox/pkginstall.sh --srv421 ${BASEDIR}/opt/VirtualBox/pkginstall.sh --srv4 22 22 rc=$? 23 23 fi 24 24 25 # installf inherits ${PKG_INSTALL_ROOT} from pkgadd, no need to explicitly specify 25 26 /usr/sbin/installf -f $PKGINST 26 27 -
trunk/src/VBox/Installer/solaris/preremove.sh
r28800 r30667 17 17 if test "$currentzone" = "global"; then 18 18 echo "Removing VirtualBox services and drivers..." 19 /opt/VirtualBox/vboxconfig.sh --preremove19 ${BASEDIR}/opt/VirtualBox/vboxconfig.sh --preremove 20 20 if test "$?" -eq 0; then 21 21 echo "Done." -
trunk/src/VBox/Installer/solaris/vbox.pkginfo
r26538 r30667 12 12 MAXINST=1 13 13 EMAIL="[email protected]" 14 CLASSES=none sed14 CLASSES=none manifest 15 15 DESC="A powerful PC virtualization solution" 16 16 -
trunk/src/VBox/Installer/solaris/vboxconfig.sh
r28800 r30667 16 16 # 17 17 18 19 18 # Never use exit 2 or exit 20 etc., the return codes are used in 20 19 # SRv4 postinstall procedures which carry special meaning. Just use exit 1 for failure. … … 23 22 HOST_OS_MAJORVERSION=`uname -r` 24 23 # Which OpenSolaris version (snv_xxx)? 25 HOST_OS_MINORVERSION=`uname -v | sed -e "s/snv_//" -e "s/[^0-9]//"`26 27 DIR_VBOXBASE= /opt/VirtualBox28 DIR_CONF=" /platform/i86pc/kernel/drv"29 DIR_MOD_32=" /platform/i86pc/kernel/drv"24 HOST_OS_MINORVERSION=`uname -v | grep 'snv' | sed -e "s/snv_//" -e "s/[^0-9]//"` 25 26 DIR_VBOXBASE=${BASEDIR}/opt/VirtualBox 27 DIR_CONF="${BASEDIR}/platform/i86pc/kernel/drv" 28 DIR_MOD_32="${BASEDIR}/platform/i86pc/kernel/drv" 30 29 DIR_MOD_64=$DIR_MOD_32/amd64 31 30 … … 63 62 DESC_VBOXUSB="USB" 64 63 64 REMOTEINST=0 65 65 FATALOP=fatal 66 66 NULLOP=nulloutput … … 149 149 } 150 150 151 # get_sysinfo 152 # cannot fail 153 get_sysinfo() 154 { 155 if test "$REMOTEINST" -eq 1 || test -z "$HOST_OS_MINORVERSION" || test -z "$HOST_OS_MAJORVERSION"; then 156 if test -f "${BASEDIR}/etc/release"; then 157 HOST_OS_MAJORVERSION=`cat ${BASEDIR}/etc/release | grep "Solaris 10"` 158 if test -n "$HOST_OS_MAJORVERSION"; then 159 HOST_OS_MAJORVERSION="5.10" 160 else 161 HOST_OS_MAJORVERSION=`cat ${BASEDIR}/etc/release | grep "snv_"` 162 if test -n "$HOST_OS_MAJORVERSION"; then 163 HOST_OS_MAJORVERSION="5.11" 164 fi 165 fi 166 if test "$HOST_OS_MAJORVERSION" != "5.10"; then 167 HOST_OS_MINORVERSION=`cat ${BASEDIR}/etc/release | tr ' ' '\n' | grep 'snv_' | sed -e "s/snv_//" -e "s/[^0-9]//"` 168 else 169 HOST_OS_MINORVERSION="" 170 fi 171 else 172 HOST_OS_MAJORVERSION="" 173 HOST_OS_MINORVERSION="" 174 fi 175 fi 176 } 177 151 178 # check_zone() 152 179 # !! failure is always fatal … … 192 219 193 220 # Add a space at end of module name to make sure we have a perfect match to avoid 194 # any substring matches: e.g "vboxusb" & "vbo xusbmon"195 loadentry=`cat /etc/name_to_major | grep "$1 "`221 # any substring matches: e.g "vboxusb" & "vbo $BASEDIR_OPT xusbmon" 222 loadentry=`cat ${BASEDIR}/etc/name_to_major | grep "$1 "` 196 223 if test -z "$loadentry"; then 197 224 return 1 … … 235 262 if test -n "$modperm"; then 236 263 if test "$nullop" = "$NULLOP"; then 237 $BIN_ADDDRV -m"$modperm" $modname >/dev/null 2>&1238 else 239 $BIN_ADDDRV -m"$modperm" $modname264 $BIN_ADDDRV $BASEDIR_OPT -m"$modperm" $modname >/dev/null 2>&1 265 else 266 $BIN_ADDDRV $BASEDIR_OPT -m"$modperm" $modname 240 267 fi 241 268 else 242 269 if test "$nullop" = "$NULLOP"; then 243 $BIN_ADDDRV $ modname >/dev/null 2>&1244 else 245 $BIN_ADDDRV $ modname270 $BIN_ADDDRV $BASEDIR_OPT $modname >/dev/null 2>&1 271 else 272 $BIN_ADDDRV $BASEDIR_OPT $modname 246 273 fi 247 274 fi … … 253 280 fi 254 281 return 1 282 elif test "$REMOTEINST" -eq 1 && test "$?" -eq 0; then 283 subprint "Added: $moddesc driver" 255 284 fi 256 285 return 0 … … 269 298 moddesc=$2 270 299 fatal=$3 300 271 301 module_added $modname 272 302 if test "$?" -eq 0; then 273 303 if test "$ISIPS" != "$IPSOP"; then 274 $BIN_REMDRV $modname 275 else 276 $BIN_REMDRV $modname >/dev/null 2>&1 277 fi 304 $BIN_REMDRV $BASEDIR_OPT $modname 305 else 306 $BIN_REMDRV $BASEDIR_OPT $modname >/dev/null 2>&1 307 fi 308 # for remote installs, don't bother with return values of rem_drv 278 309 if test $? -eq 0; then 279 310 subprint "Removed: $moddesc module" … … 296 327 errorprint "missing argument to unload_module()" 297 328 exit 1 329 fi 330 331 # No-OP for non-root installs 332 if test "$REMOTEINST" -eq 1; then 333 return 0 298 334 fi 299 335 … … 325 361 errorprint "missing argument to load_module()" 326 362 exit 1 363 fi 364 365 # No-OP for non-root installs 366 if test "$REMOTEINST" -eq 1; then 367 return 0 327 368 fi 328 369 … … 360 401 361 402 # Add vboxdrv to devlink.tab 362 sed -e '/name=vboxdrv/d' /etc/devlink.tab > /etc/devlink.vbox 363 echo "type=ddi_pseudo;name=vboxdrv \D" >> /etc/devlink.vbox 364 mv -f /etc/devlink.vbox /etc/devlink.tab 365 366 # Create the device link 367 /usr/sbin/devfsadm -i "$MOD_VBOXDRV" 368 369 if test $? -eq 0 && test -h "/dev/vboxdrv"; then 370 371 if test -f "$DIR_CONF/vboxnet.conf"; then 372 add_driver "$MOD_VBOXNET" "$DESC_VBOXNET" "$FATALOP" 373 load_module "drv/$MOD_VBOXNET" "$DESC_VBOXNET" "$FATALOP" 374 fi 375 376 if test -f "$DIR_CONF/vboxflt.conf"; then 377 add_driver "$MOD_VBOXFLT" "$DESC_VBOXFLT" "$FATALOP" 378 load_module "drv/$MOD_VBOXFLT" "$DESC_VBOXFLT" "$FATALOP" 379 fi 380 381 if test -f "$DIR_CONF/vboxusbmon.conf" && test "$HOST_OS_MAJORVERSION" != "5.10"; then 382 # For VirtualBox 3.1 the new USB code requires Nevada > 123 383 if test "$HOST_OS_MINORVERSION" -gt 123; then 384 add_driver "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$FATALOP" "not-$NULLOP" "'* 0666 root sys'" 385 load_module "drv/$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$FATALOP" 386 387 # Add vboxusbmon to devlink.tab 388 sed -e '/name=vboxusbmon/d' /etc/devlink.tab > /etc/devlink.vbox 389 echo "type=ddi_pseudo;name=vboxusbmon \D" >> /etc/devlink.vbox 390 mv -f /etc/devlink.vbox /etc/devlink.tab 391 392 # Create the device link 403 if test -f "${BASEDIR}/etc/devlink.tab"; then 404 sed -e '/name=vboxdrv/d' ${BASEDIR}/etc/devlink.tab > ${BASEDIR}/etc/devlink.vbox 405 echo "type=ddi_pseudo;name=vboxdrv \D" >> ${BASEDIR}/etc/devlink.vbox 406 mv -f ${BASEDIR}/etc/devlink.vbox ${BASEDIR}/etc/devlink.tab 407 else 408 errorprint "Missing ${BASEDIR}/etc/devlink.tab, aborting install" 409 return 1 410 fi 411 412 # Create the device link for non-remote installs 413 if test "$REMOTEINST" -eq 0; then 414 /usr/sbin/devfsadm -i "$MOD_VBOXDRV" 415 if test $? -ne 0 || test ! -h "/dev/vboxdrv"; then 416 errorprint "Failed to create device link for $MOD_VBOXDRV." 417 exit 1 418 fi 419 fi 420 421 # Load VBoxNetAdp 422 if test -f "$DIR_CONF/vboxnet.conf"; then 423 add_driver "$MOD_VBOXNET" "$DESC_VBOXNET" "$FATALOP" 424 load_module "drv/$MOD_VBOXNET" "$DESC_VBOXNET" "$FATALOP" 425 fi 426 427 # Load VBoxNetFlt 428 if test -f "$DIR_CONF/vboxflt.conf"; then 429 add_driver "$MOD_VBOXFLT" "$DESC_VBOXFLT" "$FATALOP" 430 load_module "drv/$MOD_VBOXFLT" "$DESC_VBOXFLT" "$FATALOP" 431 fi 432 433 # Load VBoxUSBMon, VBoxUSB 434 if test -f "$DIR_CONF/vboxusbmon.conf" && test "$HOST_OS_MAJORVERSION" != "5.10"; then 435 # For VirtualBox 3.1 the new USB code requires Nevada > 123 436 if test "$HOST_OS_MINORVERSION" -gt 123; then 437 add_driver "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$FATALOP" "not-$NULLOP" "'* 0666 root sys'" 438 load_module "drv/$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$FATALOP" 439 440 # Add vboxusbmon to devlink.tab 441 sed -e '/name=vboxusbmon/d' ${BASEDIR}/etc/devlink.tab > ${BASEDIR}/etc/devlink.vbox 442 echo "type=ddi_pseudo;name=vboxusbmon \D" >> ${BASEDIR}/etc/devlink.vbox 443 mv -f ${BASEDIR}/etc/devlink.vbox ${BASEDIR}/etc/devlink.tab 444 445 # Create the device link for non-remote installs 446 if test "$REMOTEINST" -eq 0; then 393 447 /usr/sbin/devfsadm -i "$MOD_VBOXUSBMON" 394 448 if test $? -ne 0; then … … 396 450 exit 1 397 451 fi 398 399 # Add vboxusb if present 400 # This driver is special, we need it in the boot-archive but since there is no 401 # USB device to attach to now (it's done at runtime) it will fail to attach so 402 # redirect attaching failure output to /dev/null 403 if test -f "$DIR_CONF/vboxusb.conf"; then 404 add_driver "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP" "$NULLOP" 405 load_module "drv/$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP" 406 fi 452 fi 453 454 # Add vboxusb if present 455 # This driver is special, we need it in the boot-archive but since there is no 456 # USB device to attach to now (it's done at runtime) it will fail to attach so 457 # redirect attaching failure output to /dev/null 458 if test -f "$DIR_CONF/vboxusb.conf"; then 459 add_driver "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP" "$NULLOP" 460 load_module "drv/$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP" 461 fi 462 else 463 if test -n "$HOST_OS_MINORVERSION"; then 464 warnprint "Solaris 5.11 snv_124 or higher required for USB support. Skipped installing USB support." 407 465 else 408 warnprint "Solaris 5.11 snv_124 or higher required for USB support. Skipped installing USB support." 409 fi 410 fi 411 else 412 errorprint "Failed to create device link for $MOD_VBOXDRV." 413 exit 1 466 warnprint "Failed to determine Solaris 5.11 snv version. Skipped installing USB support." 467 fi 468 fi 414 469 fi 415 470 … … 424 479 425 480 # Remove vboxdrv from devlink.tab 426 devlinkfound=`cat /etc/devlink.tab | grep vboxdrv` 427 if test -n "$devlinkfound"; then 428 sed -e '/name=vboxdrv/d' /etc/devlink.tab > /etc/devlink.vbox 429 mv -f /etc/devlink.vbox /etc/devlink.tab 430 fi 431 432 # Remove vboxusbmon from devlink.tab 433 devlinkfound=`cat /etc/devlink.tab | grep vboxusbmon` 434 if test -n "$devlinkfound"; then 435 sed -e '/name=vboxusbmon/d' /etc/devlink.tab > /etc/devlink.vbox 436 mv -f /etc/devlink.vbox /etc/devlink.tab 481 if test -f ${BASEDIR}/etc/devlink.tab; then 482 devlinkfound=`cat ${BASEDIR}/etc/devlink.tab | grep vboxdrv` 483 if test -n "$devlinkfound"; then 484 sed -e '/name=vboxdrv/d' ${BASEDIR}/etc/devlink.tab > ${BASEDIR}/etc/devlink.vbox 485 mv -f ${BASEDIR}/etc/devlink.vbox ${BASEDIR}/etc/devlink.tab 486 fi 487 488 # Remove vboxusbmon from devlink.tab 489 devlinkfound=`cat ${BASEDIR}/etc/devlink.tab | grep vboxusbmon` 490 if test -n "$devlinkfound"; then 491 sed -e '/name=vboxusbmon/d' ${BASEDIR}/etc/devlink.tab > ${BASEDIR}/etc/devlink.vbox 492 mv -f ${BASEDIR}/etc/devlink.vbox ${BASEDIR}/etc/devlink.tab 493 fi 437 494 fi 438 495 … … 456 513 457 514 # remove devlinks 458 if test -h " /dev/vboxdrv" || test -f "/dev/vboxdrv"; then459 rm -f /dev/vboxdrv460 fi 461 if test -h " /dev/vboxusbmon" || test -f "/dev/vboxusbmon"; then462 rm -f /dev/vboxusbmon515 if test -h "${BASEDIR}/dev/vboxdrv" || test -f "${BASEDIR}/dev/vboxdrv"; then 516 rm -f ${BASEDIR}/dev/vboxdrv 517 fi 518 if test -h "${BASEDIR}/dev/vboxusbmon" || test -f "${BASEDIR}/dev/vboxusbmon"; then 519 rm -f ${BASEDIR}/dev/vboxusbmon 463 520 fi 464 521 465 522 # unpatch nwam/dhcpagent fix 466 nwamfile= /etc/nwam/llp523 nwamfile=${BASEDIR}/etc/nwam/llp 467 524 nwambackupfile=$nwamfile.vbox 468 525 if test -f "$nwamfile"; then … … 472 529 473 530 # remove netmask configuration 474 nmaskfile= /etc/netmasks531 nmaskfile=${BASEDIR}/etc/netmasks 475 532 nmaskbackupfile=$nmaskfile.vbox 476 533 if test -f "$nmaskfile"; then … … 519 576 fatal=$1 520 577 521 # stop and unregister webservice SMF 578 # No-Op for remote installs 579 if test "$REMOTEINST" -eq 1; then 580 return 0 581 fi 582 583 # stop webservice 522 584 servicefound=`$BIN_SVCS -a | grep "virtualbox/webservice" 2>/dev/null` 523 585 if test ! -z "$servicefound"; then 524 586 $BIN_SVCADM disable -s svc:/application/virtualbox/webservice:default 525 $BIN_SVCCFG delete svc:/application/virtualbox/webservice:default 587 # Don't delete the manifest, this is handled by the manifest class action 588 # $BIN_SVCCFG delete svc:/application/virtualbox/webservice:default 526 589 if test "$?" -eq 0; then 527 590 subprint "Unloaded: Web service" … … 531 594 fi 532 595 533 # stop and unregister zoneaccess SMF596 # stop zoneaccess service 534 597 servicefound=`$BIN_SVCS -a | grep "virtualbox/zoneaccess" 2>/dev/null` 535 598 if test ! -z "$servicefound"; then 536 599 $BIN_SVCADM disable -s svc:/application/virtualbox/zoneaccess 537 $BIN_SVCCFG delete svc:/application/virtualbox/zoneaccess 600 # Don't delete the manifest, this is handled by the manifest class action 601 # $BIN_SVCCFG delete svc:/application/virtualbox/zoneaccess 538 602 if test "$?" -eq 0; then 539 603 subprint "Unloaded: Zone access service" … … 543 607 fi 544 608 545 # unplumb all vboxnet instances 609 # unplumb all vboxnet instances for non-remote installs 546 610 inst=0 547 611 while test $inst -ne $MOD_VBOXNET_INST; do … … 584 648 if test -f "$DIR_CONF/vboxnet.conf"; then 585 649 # nwam/dhcpagent fix 586 nwamfile= /etc/nwam/llp650 nwamfile=${BASEDIR}/etc/nwam/llp 587 651 nwambackupfile=$nwamfile.vbox 588 652 if test -f "$nwamfile"; then … … 600 664 fi 601 665 602 # plumb and configure vboxnet0 603 $BIN_IFCONFIG vboxnet0 plumb up 604 if test "$?" -eq 0; then 605 $BIN_IFCONFIG vboxnet0 192.168.56.1 netmask 255.255.255.0 up 606 607 # add the netmask to stay persistent across host reboots 608 nmaskfile=/etc/netmasks 609 nmaskbackupfile=$nmaskfile.vbox 610 if test -f $nmaskfile; then 611 sed -e '/#VirtualBox_SectionStart/,/#VirtualBox_SectionEnd/d' $nmaskfile > $nmaskbackupfile 612 echo "#VirtualBox_SectionStart" >> $nmaskbackupfile 613 inst=0 614 networkn=56 615 while test $inst -ne 1; do 616 echo "192.168.$networkn.0 255.255.255.0" >> $nmaskbackupfile 617 inst=`expr $inst + 1` 618 networkn=`expr $networkn + 1` 619 done 620 echo "#VirtualBox_SectionEnd" >> $nmaskbackupfile 621 mv -f $nmaskbackupfile $nmaskfile 666 # plumb and configure vboxnet0 for non-remote installs 667 if test "$REMOTEINST" -eq 0; then 668 $BIN_IFCONFIG vboxnet0 plumb up 669 if test "$?" -eq 0; then 670 $BIN_IFCONFIG vboxnet0 192.168.56.1 netmask 255.255.255.0 up 671 672 # add the netmask to stay persistent across host reboots 673 nmaskfile=${BASEDIR}/etc/netmasks 674 nmaskbackupfile=$nmaskfile.vbox 675 if test -f $nmaskfile; then 676 sed -e '/#VirtualBox_SectionStart/,/#VirtualBox_SectionEnd/d' $nmaskfile > $nmaskbackupfile 677 echo "#VirtualBox_SectionStart" >> $nmaskbackupfile 678 inst=0 679 networkn=56 680 while test $inst -ne 1; do 681 echo "192.168.$networkn.0 255.255.255.0" >> $nmaskbackupfile 682 inst=`expr $inst + 1` 683 networkn=`expr $networkn + 1` 684 done 685 echo "#VirtualBox_SectionEnd" >> $nmaskbackupfile 686 mv -f $nmaskbackupfile $nmaskfile 687 fi 688 else 689 # Should this be fatal? 690 warnprint "Failed to bring up vboxnet0!!" 622 691 fi 623 else 624 # Should this be fatal? 625 warnprint "Failed to bring up vboxnet0!!" 626 fi 627 fi 628 629 if test -f /var/svc/manifest/application/virtualbox/virtualbox-webservice.xml || test -f /var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml; then 692 fi 693 fi 694 695 if test -f ${BASEDIR}/var/svc/manifest/application/virtualbox/virtualbox-webservice.xml || test -f ${BASEDIR}/var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml; then 630 696 infoprint "Configuring services..." 631 fi 632 633 # Web service 634 if test -f /var/svc/manifest/application/virtualbox/virtualbox-webservice.xml; then 635 /usr/sbin/svccfg import /var/svc/manifest/application/virtualbox/virtualbox-webservice.xml 636 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice:default 637 if test "$?" -eq 0; then 638 subprint "Loaded: Web service" 639 else 640 subprint "Loading: Web service ...ERROR(S)." 641 fi 642 fi 643 644 # Zone access service 645 if test -f /var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml; then 646 /usr/sbin/svccfg import /var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml 647 /usr/sbin/svcadm enable -s svc:/application/virtualbox/zoneaccess 648 if test "$?" -eq 0; then 649 subprint "Loaded: Zone access service" 650 else 651 subprint "Loading: Zone access service ...ERROR(S)." 652 fi 653 fi 654 655 # Install python bindings 656 if test -f "$DIR_VBOXBASE/sdk/installer/vboxapisetup.py" || test -h "$DIR_VBOXBASE/sdk/installer/vboxapisetup.py"; then 657 PYTHONBIN=`which python 2> /dev/null` 658 if test -f "$PYTHONBIN" || test -h "$PYTHONBIN"; then 659 infoprint "Installing Python bindings..." 660 661 INSTALLEDIT=1 662 PYTHONBIN=`which python2.4 2>/dev/null` 663 install_python_bindings "$PYTHONBIN" "Python 2.4" 697 if test "$REMOTEINST" -eq 1; then 698 subprint "Skipped for targetted installs." 699 fi 700 fi 701 702 # Enable Zone access service for non-remote installs, other services (Webservice) are delivered disabled by the manifest class action 703 if test "$REMOTEINST" -eq 0; then 704 servicefound=`$BIN_SVCS -a | grep "virtualbox/zoneaccess" | grep "disabled" 2>/dev/null` 705 if test ! -z "$servicefound"; then 706 /usr/sbin/svcadm enable -s svc:/application/virtualbox/zoneaccess 664 707 if test "$?" -eq 0; then 665 INSTALLEDIT=0 708 subprint "Loaded: Zone access service" 709 else 710 subprint "Loading Zone access service ...FAILED." 666 711 fi 667 PYTHONBIN=`which python2.5 2>/dev/null` 668 install_python_bindings "$PYTHONBIN" "Python 2.5" 669 if test "$?" -eq 0; then 670 INSTALLEDIT=0 712 fi 713 fi 714 715 # Install python bindings for non-remote installs 716 if test "$REMOTEINST" -eq 0; then 717 if test -f "$DIR_VBOXBASE/sdk/installer/vboxapisetup.py" || test -h "$DIR_VBOXBASE/sdk/installer/vboxapisetup.py"; then 718 PYTHONBIN=`which python 2> /dev/null` 719 if test -f "$PYTHONBIN" || test -h "$PYTHONBIN"; then 720 infoprint "Installing Python bindings..." 721 722 INSTALLEDIT=1 723 PYTHONBIN=`which python2.4 2>/dev/null` 724 install_python_bindings "$PYTHONBIN" "Python 2.4" 725 if test "$?" -eq 0; then 726 INSTALLEDIT=0 727 fi 728 PYTHONBIN=`which python2.5 2>/dev/null` 729 install_python_bindings "$PYTHONBIN" "Python 2.5" 730 if test "$?" -eq 0; then 731 INSTALLEDIT=0 732 fi 733 PYTHONBIN=`which python2.6 2>/dev/null` 734 install_python_bindings "$PYTHONBIN" "Python 2.6" 735 if test "$?" -eq 0; then 736 INSTALLEDIT=0 737 fi 738 739 # remove files installed by Python build 740 rm -rf $DIR_VBOXBASE/sdk/installer/build 741 742 if test "$INSTALLEDIT" -ne 0; then 743 warnprint "No suitable Python version found. Required Python 2.4, 2.5 or 2.6." 744 warnprint "Skipped installing the Python bindings." 745 fi 746 else 747 warnprint "Python not found, skipped installed Python bindings." 671 748 fi 672 PYTHONBIN=`which python2.6 2>/dev/null` 673 install_python_bindings "$PYTHONBIN" "Python 2.6" 674 if test "$?" -eq 0; then 675 INSTALLEDIT=0 676 fi 677 678 # remove files installed by Python build 679 rm -rf $DIR_VBOXBASE/sdk/installer/build 680 681 if test "$INSTALLEDIT" -ne 0; then 682 warnprint "No suitable Python version found. Required Python 2.4, 2.5 or 2.6." 683 warnprint "Skipped installing the Python bindings." 684 fi 685 else 686 warnprint "Python not found, skipped installed Python bindings." 687 fi 749 fi 750 else 751 warnprint "Skipped installing Python bindings. Run, as root, 'vboxapisetup.py install' manually from the booted system." 688 752 fi 689 753 690 754 # Update boot archive 691 755 infoprint "Updating the boot archive..." 692 $BIN_BOOTADM update-archive > /dev/null 756 if test "$REMOTEINST" -eq 0; then 757 $BIN_BOOTADM update-archive > /dev/null 758 else 759 $BIN_BOOTADM update-archive -R ${BASEDIR} > /dev/null 760 fi 693 761 694 762 return 0 … … 722 790 check_zone 723 791 find_bins 792 get_sysinfo 793 794 if test "x${BASEDIR}" != "x/"; then 795 BASEDIR_OPT="-b ${BASEDIR}" 796 REMOTEINST=1 797 fi 724 798 725 799 # Get command line options
Note:
See TracChangeset
for help on using the changeset viewer.