VirtualBox

Ignore:
Timestamp:
Nov 2, 2009 9:50:12 AM (15 years ago)
Author:
vboxsync
Message:

Solaris/Additions: some zone fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/Installer/postinstall.sh

    r21821 r24240  
    6767
    6868solaris64dir="amd64"
    69 vboxadditions_path="/opt/VirtualBoxAdditions"
     69vboxadditions_path="$BASEDIR/opt/VirtualBoxAdditions"
    7070vboxadditions64_path=$vboxadditions_path/$solaris64dir
    7171
     72# get the current zone
     73currentzone=`zonename`
    7274# get what ISA the guest is running
    7375cputype=`isainfo -k`
     
    7779    isadir=""
    7880fi
     81
    7982vboxadditionsisa_path=$vboxadditions_path/$isadir
    8083
     
    9194fi
    9295
    93 # vboxguest.sh would've been installed, we just need to call it.
    94 echo "Configuring VirtualBox guest kernel module..."
    95 $vboxadditions_path/vboxguest.sh restartall silentunload
    96 
    97 sed -e '
    98 /name=vboxguest/d' /etc/devlink.tab > /etc/devlink.vbox
    99 echo "type=ddi_pseudo;name=vboxguest    \D" >> /etc/devlink.vbox
    100 mv -f /etc/devlink.vbox /etc/devlink.tab
    101 
    102 # create the device link
    103 /usr/sbin/devfsadm -i vboxguest
    104 sync
     96
     97if test "$currentzone" = "global"; then
     98    # vboxguest.sh would've been installed, we just need to call it.
     99    echo "Configuring VirtualBox guest kernel module..."
     100    $vboxadditions_path/vboxguest.sh restartall silentunload
     101
     102    sed -e '/name=vboxguest/d' /etc/devlink.tab > /etc/devlink.vbox
     103    echo "type=ddi_pseudo;name=vboxguest        \D" >> /etc/devlink.vbox
     104    mv -f /etc/devlink.vbox /etc/devlink.tab
     105
     106    # create the device link
     107    /usr/sbin/devfsadm -i vboxguest
     108    sync
     109fi
     110
    105111
    106112# check if Xorg exists
     
    114120# create links
    115121echo "Creating links..."
    116 /usr/sbin/installf -c none $PKGINST /dev/vboxguest=../devices/pci@0,0/pci80ee,cafe@4:vboxguest s
     122if test "$currentzone" = "global"; then
     123    /usr/sbin/installf -c none $PKGINST /dev/vboxguest=../devices/pci@0,0/pci80ee,cafe@4:vboxguest s
     124fi
    117125if test ! -z "$xorgbin"; then
    118126    /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxClient=$vboxadditions_path/VBox.sh s
     
    305313
    306314
    307 # Setup our VBoxService SMF service
    308 echo "Configuring service..."
    309 
    310 /usr/sbin/svccfg import /var/svc/manifest/system/virtualbox/vboxservice.xml
    311 /usr/sbin/svcadm enable svc:/system/virtualbox/vboxservice
    312 
    313 /usr/sbin/devfsadm -i vboxguest
    314 
    315 # Update boot archive
    316 BOOTADMBIN=/sbin/bootadm
    317 if test -x "$BOOTADMBIN"; then
    318     if test -h "/dev/vboxguest"; then
    319         echo "Updating boot archive..."
    320         $BOOTADMBIN update-archive > /dev/null
     315if test "$currentzone" = "global"; then
     316    # Setup our VBoxService SMF service
     317    echo "Configuring service..."
     318
     319    /usr/sbin/svccfg import /var/svc/manifest/system/virtualbox/vboxservice.xml
     320    /usr/sbin/svcadm enable svc:/system/virtualbox/vboxservice
     321
     322    /usr/sbin/devfsadm -i vboxguest
     323
     324    # Update boot archive
     325    BOOTADMBIN=/sbin/bootadm
     326    if test -x "$BOOTADMBIN"; then
     327        if test -h "/dev/vboxguest"; then
     328            echo "Updating boot archive..."
     329            $BOOTADMBIN update-archive > /dev/null
     330        else
     331            echo "## Guest kernel module doesn't seem to be up. Skipped explicit boot-archive update."
     332        fi
    321333    else
    322         echo "## Guest kernel module doesn't seem to be up. Skipped explicit boot-archive update."
    323     fi
    324 else
    325     echo "## $BOOTADMBIN not found/executable. Skipped explicit boot-archive update."
    326 fi
     334        echo "## $BOOTADMBIN not found/executable. Skipped explicit boot-archive update."
     335    fi
     336fi
     337
    327338
    328339echo "Done."
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