VirtualBox

Changeset 19170 in vbox


Ignore:
Timestamp:
Apr 24, 2009 1:24:22 PM (16 years ago)
Author:
vboxsync
Message:

Additions/Solaris/Installer: CLI only installs.

Location:
trunk/src/VBox/Additions/solaris/Installer
Files:
4 edited

Legend:

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

    r18653 r19170  
    8686
    8787# this is required for amd64-specific package where we do not build 32-bit binaries
    88 filelist_fixup prototype '$3 == "opt/VirtualBoxAdditions/amd64/vboxfsmount=vboxfsmount"'   '$3 = "etc/fs/vboxfs/mount=amd64/vboxfsmount"; $6="sys"'
     88filelist_fixup prototype '$3 == "opt/VirtualBoxAdditions/amd64/vboxfsmount=amd64/vboxfsmount"'   '$3 = "etc/fs/vboxfs/mount=amd64/vboxfsmount"; $6="sys"'
    8989
    9090# crogl 32-bit opengl fixup
  • trunk/src/VBox/Additions/solaris/Installer/postinstall.sh

    r18907 r19170  
    104104sync
    105105
     106# check if Xorg exists
     107if test -f "/usr/X11/bin/Xorg"; then
     108    xorgbin="/usr/X11/bin/Xorg"
     109else
     110    xorgbin=""
     111    retval=0
     112fi
     113
    106114# create links
    107115echo "Creating links..."
    108116/usr/sbin/installf -c none $PKGINST /dev/vboxguest=../devices/pci@0,0/pci80ee,cafe@4:vboxguest s
    109 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxClient=$vboxadditions_path/VBox.sh s
     117if test ! -z "$xorgbin"; then
     118    /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxClient=$vboxadditions_path/VBox.sh s
     119    /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxRandR=$vboxadditions_path/VBoxRandR.sh s
     120    /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxClient-all=$vboxadditions_path/1099.vboxclient s
     121fi
     122/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxControl=$vboxadditions_path/VBox.sh s
    110123/usr/sbin/installf -c none $PKGINST /usr/bin/VBoxService=$vboxadditions_path/VBox.sh s
    111 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxControl=$vboxadditions_path/VBox.sh s
    112 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxRandR=$vboxadditions_path/VBoxRandR.sh s
    113 /usr/sbin/installf -c none $PKGINST /usr/bin/VBoxClient-all=$vboxadditions_path/1099.vboxclient s
     124
    114125
    115126# Install Xorg components to the required places
    116 xorgversion_long=`/usr/X11/bin/Xorg -version 2>&1 | grep "X Window System Version"`
    117 xorgversion=`/usr/bin/expr "${xorgversion_long}" : 'X Window System Version \([^ ]*\)'`
    118 if test -z "$xorgversion_long"; then
    119     xorgversion_long=`/usr/X11/bin/Xorg -version 2>&1 | grep "X.Org X Server"`
    120     xorgversion=`/usr/bin/expr "${xorgversion_long}" : 'X.Org X Server \([^ ]*\)'`
    121 fi
    122 
    123 vboxmouse_src=""
    124 vboxvideo_src=""
    125 
    126 case "$xorgversion" in
    127     1.3.* )
    128         vboxmouse_src="vboxmouse_drv_71.so"
    129         vboxvideo_src="vboxvideo_drv_13.so"
    130         ;;
    131     1.4.* )
    132         vboxmouse_src="vboxmouse_drv_14.so"
    133         vboxvideo_src="vboxvideo_drv_14.so"
    134         ;;
    135     1.5.99 | 1.6.* )
    136         vboxmouse_src="vboxmouse_drv_16.so"
    137         vboxvideo_src="vboxvideo_drv_16.so"
    138         ;;
    139     1.5.* )
    140         vboxmouse_src="vboxmouse_drv_15.so"
    141         vboxvideo_src="vboxvideo_drv_15.so"
    142         ;;
    143     7.1.* | *7.2.* )
    144         vboxmouse_src="vboxmouse_drv_71.so"
    145         vboxvideo_src="vboxvideo_drv_71.so"
    146         ;;
    147     6.9.* | 7.0.* )
    148         vboxmouse_src="vboxmouse_drv_70.so"
    149         vboxvideo_src="vboxvideo_drv_70.so"
    150         ;;
    151 esac
    152 
    153 retval=0
    154 if test -z "$vboxmouse_src"; then
    155     echo "*** Unknown version of the X Window System installed."
    156     echo "*** Failed to install the VirtualBox X Window System drivers."
    157 
    158     # Exit as partially failed installation
    159     retval=2
    160 else
    161     echo "Configuring Xorg..."
    162 
    163     # 32-bit x11 drivers
    164     if test -f "$vboxadditions_path/$vboxmouse_src"; then
    165         vboxmouse_dest="/usr/X11/lib/modules/input/vboxmouse_drv.so"
    166         vboxvideo_dest="/usr/X11/lib/modules/drivers/vboxvideo_drv.so"
    167         /usr/sbin/installf -c none $PKGINST "$vboxmouse_dest" f
    168         /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f
    169         cp "$vboxadditions_path/$vboxmouse_src" "$vboxmouse_dest"
    170         cp "$vboxadditions_path/$vboxvideo_src" "$vboxvideo_dest"
    171 
    172         # Removing redundent names from pkg and files from disk
    173         /usr/sbin/removef $PKGINST $vboxadditions_path/vboxmouse_drv_* 1>/dev/null
    174         /usr/sbin/removef $PKGINST $vboxadditions_path/vboxvideo_drv_* 1>/dev/null
    175         rm -f $vboxadditions_path/vboxmouse_drv_*
    176         rm -f $vboxadditions_path/vboxvideo_drv_*
    177     fi
    178 
    179     # 64-bit x11 drivers
    180     if test -f "$vboxadditions64_path/$vboxmouse_src"; then
    181         vboxmouse_dest="/usr/X11/lib/modules/input/$solaris64dir/vboxmouse_drv.so"
    182         vboxvideo_dest="/usr/X11/lib/modules/drivers/$solaris64dir/vboxvideo_drv.so"
    183         /usr/sbin/installf -c none $PKGINST "$vboxmouse_dest" f
    184         /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f
    185         cp "$vboxadditions64_path/$vboxmouse_src" "$vboxmouse_dest"
    186         cp "$vboxadditions64_path/$vboxvideo_src" "$vboxvideo_dest"
    187 
    188         # Removing redundent names from pkg and files from disk
    189         /usr/sbin/removef $PKGINST $vboxadditions64_path/vboxmouse_drv_* 1>/dev/null
    190         /usr/sbin/removef $PKGINST $vboxadditions64_path/vboxvideo_drv_* 1>/dev/null
    191         rm -f $vboxadditions64_path/vboxmouse_drv_*
    192         rm -f $vboxadditions64_path/vboxvideo_drv_*
    193     fi
    194 
    195     # Some distros like Indiana have no xorg.conf, deal with this
    196     if test ! -f '/etc/X11/xorg.conf' && test ! -f '/etc/X11/.xorg.conf'; then
    197 
    198         # Xorg 1.3.x+ should use the modeline less Xorg confs while older should
    199         # use ones with all the video modelines in place. Argh.
    200         xorgconf_file="solaris_xorg_modeless.conf"
    201         xorgconf_unfit="solaris_xorg.conf"
     127if test ! -z "$xorgbin"; then
     128    xorgversion_long=`/usr/X11/bin/Xorg -version 2>&1 | grep "X Window System Version"`
     129    xorgversion=`/usr/bin/expr "${xorgversion_long}" : 'X Window System Version \([^ ]*\)'`
     130    if test -z "$xorgversion_long"; then
     131        xorgversion_long=`/usr/X11/bin/Xorg -version 2>&1 | grep "X.Org X Server"`
     132        xorgversion=`/usr/bin/expr "${xorgversion_long}" : 'X.Org X Server \([^ ]*\)'`
     133    fi
     134
     135    vboxmouse_src=""
     136    vboxvideo_src=""
     137
     138    case "$xorgversion" in
     139        1.3.* )
     140            vboxmouse_src="vboxmouse_drv_71.so"
     141            vboxvideo_src="vboxvideo_drv_13.so"
     142            ;;
     143        1.4.* )
     144            vboxmouse_src="vboxmouse_drv_14.so"
     145            vboxvideo_src="vboxvideo_drv_14.so"
     146            ;;
     147        1.5.99 | 1.6.* )
     148            vboxmouse_src="vboxmouse_drv_16.so"
     149            vboxvideo_src="vboxvideo_drv_16.so"
     150            ;;
     151        1.5.* )
     152            vboxmouse_src="vboxmouse_drv_15.so"
     153            vboxvideo_src="vboxvideo_drv_15.so"
     154            ;;
     155        7.1.* | *7.2.* )
     156            vboxmouse_src="vboxmouse_drv_71.so"
     157            vboxvideo_src="vboxvideo_drv_71.so"
     158            ;;
     159        6.9.* | 7.0.* )
     160            vboxmouse_src="vboxmouse_drv_70.so"
     161            vboxvideo_src="vboxvideo_drv_70.so"
     162            ;;
     163    esac
     164
     165    retval=0
     166    if test -z "$vboxmouse_src"; then
     167        echo "*** Unknown version of the X Window System installed."
     168        echo "*** Failed to install the VirtualBox X Window System drivers."
     169
     170        # Exit as partially failed installation
     171        retval=2
     172    else
     173        echo "Configuring Xorg..."
     174
     175        # 32-bit x11 drivers
     176        if test -f "$vboxadditions_path/$vboxmouse_src"; then
     177            vboxmouse_dest="/usr/X11/lib/modules/input/vboxmouse_drv.so"
     178            vboxvideo_dest="/usr/X11/lib/modules/drivers/vboxvideo_drv.so"
     179            /usr/sbin/installf -c none $PKGINST "$vboxmouse_dest" f
     180            /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f
     181            cp "$vboxadditions_path/$vboxmouse_src" "$vboxmouse_dest"
     182            cp "$vboxadditions_path/$vboxvideo_src" "$vboxvideo_dest"
     183
     184            # Removing redundent names from pkg and files from disk
     185            /usr/sbin/removef $PKGINST $vboxadditions_path/vboxmouse_drv_* 1>/dev/null
     186            /usr/sbin/removef $PKGINST $vboxadditions_path/vboxvideo_drv_* 1>/dev/null
     187            rm -f $vboxadditions_path/vboxmouse_drv_*
     188            rm -f $vboxadditions_path/vboxvideo_drv_*
     189        fi
     190
     191        # 64-bit x11 drivers
     192        if test -f "$vboxadditions64_path/$vboxmouse_src"; then
     193            vboxmouse_dest="/usr/X11/lib/modules/input/$solaris64dir/vboxmouse_drv.so"
     194            vboxvideo_dest="/usr/X11/lib/modules/drivers/$solaris64dir/vboxvideo_drv.so"
     195            /usr/sbin/installf -c none $PKGINST "$vboxmouse_dest" f
     196            /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f
     197            cp "$vboxadditions64_path/$vboxmouse_src" "$vboxmouse_dest"
     198            cp "$vboxadditions64_path/$vboxvideo_src" "$vboxvideo_dest"
     199
     200            # Removing redundent names from pkg and files from disk
     201            /usr/sbin/removef $PKGINST $vboxadditions64_path/vboxmouse_drv_* 1>/dev/null
     202            /usr/sbin/removef $PKGINST $vboxadditions64_path/vboxvideo_drv_* 1>/dev/null
     203            rm -f $vboxadditions64_path/vboxmouse_drv_*
     204            rm -f $vboxadditions64_path/vboxvideo_drv_*
     205        fi
     206
     207        # Some distros like Indiana have no xorg.conf, deal with this
     208        if test ! -f '/etc/X11/xorg.conf' && test ! -f '/etc/X11/.xorg.conf'; then
     209
     210            # Xorg 1.3.x+ should use the modeline less Xorg confs while older should
     211            # use ones with all the video modelines in place. Argh.
     212            xorgconf_file="solaris_xorg_modeless.conf"
     213            xorgconf_unfit="solaris_xorg.conf"
     214            case "$xorgversion" in
     215                7.1.* | 7.2.* | 6.9.* | 7.0.* )
     216                    xorgconf_file="solaris_xorg.conf"
     217                    xorgconf_unfit="solaris_xorg_modeless.conf"
     218                    ;;
     219            esac
     220
     221            /usr/sbin/removef $PKGINST $vboxadditions_path/$xorgconf_file 1>/dev/null
     222            mv -f $vboxadditions_path/$xorgconf_file /etc/X11/.xorg.conf
     223
     224            /usr/sbin/removef $PKGINST $vboxadditions_path/$xorgconf_unfit 1>/dev/null
     225            rm -f $vboxadditions_path/$xorgconf_unfit
     226        fi
    202227        case "$xorgversion" in
    203             7.1.* | 7.2.* | 6.9.* | 7.0.* )
    204                 xorgconf_file="solaris_xorg.conf"
    205                 xorgconf_unfit="solaris_xorg_modeless.conf"
     228            7.1.* | 7.2.* | 6.9.* | 7.0.* | 1.3.* )
     229                $vboxadditions_path/x11config.pl
     230                ;;
     231            1.5.* )
     232                $vboxadditions_path/x11config15sol.pl
    206233                ;;
    207234        esac
    208 
    209         /usr/sbin/removef $PKGINST $vboxadditions_path/$xorgconf_file 1>/dev/null
    210         mv -f $vboxadditions_path/$xorgconf_file /etc/X11/.xorg.conf
    211 
    212         /usr/sbin/removef $PKGINST $vboxadditions_path/$xorgconf_unfit 1>/dev/null
    213         rm -f $vboxadditions_path/$xorgconf_unfit
    214     fi
    215     case "$xorgversion" in
    216         7.1.* | 7.2.* | 6.9.* | 7.0.* | 1.3.* )
    217             $vboxadditions_path/x11config.pl
    218             ;;
    219         1.5.* )
    220             $vboxadditions_path/x11config15sol.pl
    221             ;;
    222     esac
    223 fi
    224 
    225 
    226 # Setup our VBoxClient
    227 echo "Configuring client..."
    228 vboxclient_src=$vboxadditions_path
    229 vboxclient_dest="/usr/dt/config/Xsession.d"
    230 if test -d "$vboxclient_dest"; then
    231     /usr/sbin/installf -c none $PKGINST "$vboxclient_dest/1099.vboxclient" f
    232     cp "$vboxclient_src/1099.vboxclient" "$vboxclient_dest/1099.vboxclient"
    233     chmod a+rx "$vboxclient_dest/1099.vboxclient"
    234 elif test -d "/usr/share/gnome/autostart"; then
    235     vboxclient_dest="/usr/share/gnome/autostart"
    236     /usr/sbin/installf -c none $PKGINST "$vboxclient_dest/vboxclient.desktop" f
    237     cp "$vboxclient_src/vboxclient.desktop" "$vboxclient_dest/vboxclient.desktop"
     235    fi
     236
     237
     238    # Setup our VBoxClient
     239    echo "Configuring client..."
     240    vboxclient_src=$vboxadditions_path
     241    vboxclient_dest="/usr/dt/config/Xsession.d"
     242    if test -d "$vboxclient_dest"; then
     243        /usr/sbin/installf -c none $PKGINST "$vboxclient_dest/1099.vboxclient" f
     244        cp "$vboxclient_src/1099.vboxclient" "$vboxclient_dest/1099.vboxclient"
     245        chmod a+rx "$vboxclient_dest/1099.vboxclient"
     246    elif test -d "/usr/share/gnome/autostart"; then
     247        vboxclient_dest="/usr/share/gnome/autostart"
     248        /usr/sbin/installf -c none $PKGINST "$vboxclient_dest/vboxclient.desktop" f
     249        cp "$vboxclient_src/vboxclient.desktop" "$vboxclient_dest/vboxclient.desktop"
     250    else
     251        echo "*** Failed to configure client!! Couldn't find autostart directory."
     252        retval=2
     253    fi
    238254else
    239     echo "*** Failed to configure client!! Couldn't find autostart directory."
    240     retval=2
    241 fi
     255    echo "(*) Xorg not found, skipped configuring Xorg guest additions."
     256fi
     257
    242258
    243259# Shared Folder kernel module (different for S10 & Nevada)
     
    269285fi
    270286
    271 
    272 # 32-bit crogl opengl library replacement
    273 if test -f "/usr/lib/VBoxOGL.so"; then
    274     cp -f /usr/X11/lib/mesa/libGL.so.1 /usr/X11/lib/mesa/libGL_original_.so.1
    275     ln -sf /usr/lib/VBoxOGL.so /usr/X11/lib/mesa/libGL.so.1
    276 fi
    277 
    278 # 64-bit crogl opengl library replacement
    279 if test -f "/usr/lib/amd64/VBoxOGL.so"; then
    280     cp -f /usr/X11/lib/mesa/amd64/libGL.so.1 /usr/X11/lib/mesa/amd64/libGL_original_.so.1
    281     ln -sf /usr/lib/amd64/VBoxOGL.so /usr/X11/lib/mesa/amd64/libGL.so.1
     287# install openGL extensions for Xorg
     288if test ! -z "$xorgbin"; then
     289    # 32-bit crogl opengl library replacement
     290    if test -f "/usr/lib/VBoxOGL.so"; then
     291        cp -f /usr/X11/lib/mesa/libGL.so.1 /usr/X11/lib/mesa/libGL_original_.so.1
     292        ln -sf /usr/lib/VBoxOGL.so /usr/X11/lib/mesa/libGL.so.1
     293    fi
     294
     295    # 64-bit crogl opengl library replacement
     296    if test -f "/usr/lib/amd64/VBoxOGL.so"; then
     297        cp -f /usr/X11/lib/mesa/amd64/libGL.so.1 /usr/X11/lib/mesa/amd64/libGL_original_.so.1
     298        ln -sf /usr/lib/amd64/VBoxOGL.so /usr/X11/lib/mesa/amd64/libGL.so.1
     299    fi
    282300fi
    283301
     
    297315echo "Done."
    298316if test $retval -eq 0; then
    299     echo "Please re-login to activate the X11 guest additions."
     317    if test ! -z "$xorgbin"; then
     318        echo "Please re-login to activate the X11 guest additions."
     319    fi
    300320    echo "If you have just un-installed the previous guest additions a REBOOT is required."
    301321fi
  • trunk/src/VBox/Additions/solaris/Installer/vboxguest.depend

    r18321 r19170  
    1 P SUNWxcu4 XCU4 Utilities
    21P SUNWuiu8 Iconv modules for UTF-8 Locale
  • trunk/src/VBox/Additions/solaris/Installer/vboxguest.sh

    r18265 r19170  
    7777check_root()
    7878{
    79     if test `/usr/xpg4/bin/id -u` -ne 0; then
     79    # the reason we don't use "-u" is that some versions of id are old and do not
     80    # support this option (eg. Solaris 10) and do not have a "--version" to check it either
     81    # so go with the uglier but more generic approach
     82    idbin=`which id`
     83    isroot=`$idbin | grep "uid=0"`
     84    if test -z "$isroot"; then
    8085        abort "This program must be run with administrator privileges.  Aborting"
    8186    fi
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