Changeset 101937 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Nov 7, 2023 12:15:59 PM (15 months ago)
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/Installer/postinstall.sh
r98103 r101937 42 42 LANG=C 43 43 export LANG 44 45 # "Remote" installs ('pkgadd -R') can skip many of the steps below. 46 REMOTE_INST=0 47 BASEDIR_OPT="" 48 if test "x${PKG_INSTALL_ROOT:-/}" != "x/"; then 49 BASEDIR_OPT="-R $PKG_INSTALL_ROOT" 50 REMOTE_INST=1 51 fi 52 export REMOTE_INST 53 export BASEDIR_OPT 44 54 45 55 # uncompress(directory, file) … … 53 63 54 64 # Remove compressed path from the pkg 55 /usr/sbin/removef $ PKGINST "$1/$2.Z" 1>/dev/null65 /usr/sbin/removef $BASEDIR_OPT $PKGINST "$1/$2.Z" 1>/dev/null 56 66 57 67 # Add uncompressed path to the pkg 58 /usr/sbin/installf -c none $PKGINST "$1/$2" f68 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST "$1/$2" f 59 69 60 70 # Uncompress the file (removes compressed file when done) … … 72 82 solaris64dir="amd64" 73 83 solaris32dir="i386" 74 vboxadditions_path="$ BASEDIR/opt/VirtualBoxAdditions"84 vboxadditions_path="${PKG_INSTALL_ROOT}/opt/VirtualBoxAdditions" 75 85 vboxadditions32_path=$vboxadditions_path/$solaris32dir 76 86 vboxadditions64_path=$vboxadditions_path/$solaris64dir … … 104 114 # vboxguest.sh would've been installed, we just need to call it. 105 115 echo "Configuring VirtualBox guest kernel module..." 106 # stop all previous modules (vboxguest, vboxfs) and start only starts vboxguest 107 $vboxadditions_path/vboxguest.sh stopall silentunload 116 # stop all previous modules (vboxguest, vboxfs) and load vboxguest 117 # ('vboxguest.sh start' only starts vboxguest). 118 if test "$REMOTE_INST" -eq 0; then 119 $vboxadditions_path/vboxguest.sh stopall silentunload 120 fi 108 121 $vboxadditions_path/vboxguest.sh start 109 122 … … 121 134 fi 122 135 123 sed -e '/name=vboxguest/d' /etc/devlink.tab >/etc/devlink.vbox124 echo "type=ddi_pseudo;name=vboxguest \D" >> /etc/devlink.vbox125 chmod 0644 /etc/devlink.vbox126 chown root:$group /etc/devlink.vbox127 mv -f /etc/devlink.vbox/etc/devlink.tab136 sed -e '/name=vboxguest/d' ${PKG_INSTALL_ROOT}/etc/devlink.tab > ${PKG_INSTALL_ROOT}/etc/devlink.vbox 137 echo "type=ddi_pseudo;name=vboxguest \D" >> ${PKG_INSTALL_ROOT}/etc/devlink.vbox 138 chmod 0644 ${PKG_INSTALL_ROOT}/etc/devlink.vbox 139 chown root:$group ${PKG_INSTALL_ROOT}/etc/devlink.vbox 140 mv -f ${PKG_INSTALL_ROOT}/etc/devlink.vbox ${PKG_INSTALL_ROOT}/etc/devlink.tab 128 141 129 142 # create the device link 130 /usr/sbin/devfsadm -i vboxguest 131 fi 132 143 /usr/sbin/devfsadm $BASEDIR_OPT -i vboxguest 144 fi 145 146 # create links 147 echo "Creating links..." 148 if test "$currentzone" = "global"; then 149 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST /dev/vboxguest=../devices/pci@0,0/pci80ee,cafe@4:vboxguest s 150 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST /dev/vboxms=../devices/pseudo/vboxms@0:vboxms s 151 fi 133 152 134 153 # check if X.Org exists (snv_130 and higher have /usr/X11/* as /usr/*) 135 if test -f " /usr/bin/Xorg"; then136 xorgbin=" /usr/bin/Xorg"137 elif test -f " /usr/X11/bin/Xorg"; then138 xorgbin=" /usr/X11/bin/Xorg"154 if test -f "${PKG_INSTALL_ROOT}/usr/bin/Xorg"; then 155 xorgbin="${PKG_INSTALL_ROOT}/usr/bin/Xorg" 156 elif test -f "${PKG_INSTALL_ROOT}/usr/X11/bin/Xorg"; then 157 xorgbin="${PKG_INSTALL_ROOT}/usr/X11/bin/Xorg" 139 158 else 140 159 xorgbin="" 141 160 retval=0 142 fi143 144 # create links145 echo "Creating links..."146 if test "$currentzone" = "global"; then147 /usr/sbin/installf -c none $PKGINST /dev/vboxguest=../devices/pci@0,0/pci80ee,cafe@4:vboxguest s148 /usr/sbin/installf -c none $PKGINST /dev/vboxms=../devices/pseudo/vboxms@0:vboxms s149 161 fi 150 162 … … 159 171 160 172 # "X.Y.Z" - strip off all numerics after the 2nd '.' character, e.g. "1.11.3" -> "1.11" 161 # The n the next sed, strips of all '.' characters,"1.11" -> "111".173 # The second sed invocation removes all '.' characters, e.g. "1.11" -> "111". 162 174 fileversion=`echo $xorgversion | sed "s/\.[0-9]*//2" | sed "s/\.//"` 163 175 vboxvideo_src="vboxvideo_drv_$fileversion.so" … … 184 196 retval=2 185 197 elif test ! -f "$vboxadditions32_path/$vboxvideo_src" && test ! -f "$vboxadditions64_path/$vboxvideo_src"; then 186 # Xorg 1.19 and later already contain a driver for vboxvideo. 187 echo "As of X.Org Server 1.19, the VirtualBox graphics driver (vboxvideo) is part" 188 echo "of Solaris. Please install it from the package repository if necessary." 198 if test ! -f "${PKG_INSTALL_ROOT}/usr/lib/xorg/modules/drivers/vboxvideo_drv.so"; then 199 # Xorg 1.19 and later (delivered first in st_006) already contain a driver 200 # for vboxvideo so advise users to install the required package if it isn't 201 # already present. 202 echo "As of X.Org Server 1.19, the VirtualBox graphics driver (vboxvideo) is part" 203 echo "of Solaris. Please install the package pkg:/x11/server/xorg/driver/xorg-video-vboxvideo" 204 echo "from the package repository for the vboxvideo_drv.so graphics driver." 205 fi 189 206 else 190 207 echo "Installing video driver for X.Org $xorgversion..." 191 208 192 209 # Determine destination paths (snv_130 and above use "/usr/lib/xorg", older use "/usr/X11/lib" 193 vboxvideo32_dest_base=" /usr/lib/xorg/modules/drivers"210 vboxvideo32_dest_base="${PKG_INSTALL_ROOT}/usr/lib/xorg/modules/drivers" 194 211 if test ! -d $vboxvideo32_dest_base; then 195 vboxvideo32_dest_base=" /usr/X11/lib/modules/drivers"212 vboxvideo32_dest_base="${PKG_INSTALL_ROOT}/usr/X11/lib/modules/drivers" 196 213 fi 197 214 … … 225 242 if test "$skip32" = "no" && test -f "$vboxadditions32_path/$vboxvideo_src"; then 226 243 vboxvideo_dest="$vboxvideo32_dest_base/vboxvideo_drv.so" 227 /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f244 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST "$vboxvideo_dest" f 228 245 cp "$vboxadditions32_path/$vboxvideo_src" "$vboxvideo_dest" 229 246 230 247 # Removing redundant names from pkg and files from disk 231 /usr/sbin/removef $ PKGINST $vboxadditions32_path/vboxvideo_drv_* 1>/dev/null248 /usr/sbin/removef $BASEDIR_OPT $PKGINST $vboxadditions32_path/vboxvideo_drv_* 1>/dev/null 232 249 rm -f $vboxadditions32_path/vboxvideo_drv_* 233 250 fi … … 236 253 if test -f "$vboxadditions64_path/$vboxvideo_src"; then 237 254 vboxvideo_dest="$vboxvideo64_dest_base/vboxvideo_drv.so" 238 /usr/sbin/installf -c none $PKGINST "$vboxvideo_dest" f255 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST "$vboxvideo_dest" f 239 256 cp "$vboxadditions64_path/$vboxvideo_src" "$vboxvideo_dest" 240 257 241 258 # Removing redundant names from pkg and files from disk 242 /usr/sbin/removef $ PKGINST $vboxadditions64_path/vboxvideo_drv_* 1>/dev/null259 /usr/sbin/removef $BASEDIR_OPT $PKGINST $vboxadditions64_path/vboxvideo_drv_* 1>/dev/null 243 260 rm -f $vboxadditions64_path/vboxvideo_drv_* 244 261 fi 245 262 246 263 # Some distros like Indiana have no xorg.conf, deal with this 247 if test ! -f '/etc/X11/xorg.conf' && test ! -f '/etc/X11/.xorg.conf'; then 248 249 # Xorg 1.3.x+ should use the modeline less Xorg confs while older should 264 if test ! -f '${PKG_INSTALL_ROOT}/etc/X11/xorg.conf' && \ 265 test ! -f '${PKG_INSTALL_ROOT}/etc/X11/.xorg.conf'; then 266 267 # Xorg 1.3.x+ should use the modeline-less Xorg confs while older should 250 268 # use ones with all the video modelines in place. Argh. 251 269 xorgconf_file="solaris_xorg_modeless.conf" … … 258 276 esac 259 277 260 /usr/sbin/removef $ PKGINST $vboxadditions_path/$xorgconf_file 1>/dev/null261 mv -f $vboxadditions_path/$xorgconf_file /etc/X11/.xorg.conf262 263 /usr/sbin/removef $ PKGINST $vboxadditions_path/$xorgconf_unfit 1>/dev/null278 /usr/sbin/removef $BASEDIR_OPT $PKGINST $vboxadditions_path/$xorgconf_file 1>/dev/null 279 mv -f $vboxadditions_path/$xorgconf_file ${PKG_INSTALL_ROOT}/etc/X11/.xorg.conf 280 281 /usr/sbin/removef $BASEDIR_OPT $PKGINST $vboxadditions_path/$xorgconf_unfit 1>/dev/null 264 282 rm -f $vboxadditions_path/$xorgconf_unfit 265 283 fi … … 267 285 # Check for VirtualBox graphics card 268 286 # S10u10's prtconf doesn't support the '-d' option, so let's use -v even though it's slower. 269 is_vboxgraphics=` prtconf -v | grep -i pci80ee,beef`287 is_vboxgraphics=`${PKG_INSTALL_ROOT}/usr/sbin/prtconf -v | grep -i pci80ee,beef` 270 288 if test "$?" -eq 0; then 271 289 drivername="vboxvideo" 272 290 else 273 291 # Check for VMware graphics card 274 is_vmwaregraphics=` prtconf -v | grep -i pci15ad,405`292 is_vmwaregraphics=`${PKG_INSTALL_ROOT}/usr/sbin/prtconf -v | grep -i pci15ad,405` 275 293 if test "$?" -eq 0; then 276 294 echo "Configuring X.Org to use VMware SVGA graphics driver..." … … 293 311 echo "Configuring client..." 294 312 vboxclient_src=$vboxadditions_path 295 vboxclient_dest=" /usr/share/gnome/autostart"313 vboxclient_dest="${PKG_INSTALL_ROOT}/usr/share/gnome/autostart" 296 314 clientinstalled=0 297 315 if test -d "$vboxclient_dest"; then 298 /usr/sbin/installf -c none $PKGINST $vboxclient_dest/vboxclient.desktop=$vboxadditions_path/vboxclient.desktop s316 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST $vboxclient_dest/vboxclient.desktop=$vboxadditions_path/vboxclient.desktop s 299 317 clientinstalled=1 300 318 fi 301 vboxclient_dest=" /usr/dt/config/Xsession.d"319 vboxclient_dest="${PKG_INSTALL_ROOT}/usr/dt/config/Xsession.d" 302 320 if test -d "$vboxclient_dest"; then 303 /usr/sbin/installf -c none $PKGINST $vboxclient_dest/1099.vboxclient=$vboxadditions_path/1099.vboxclient s321 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST $vboxclient_dest/1099.vboxclient=$vboxadditions_path/1099.vboxclient s 304 322 clientinstalled=1 305 323 fi … … 307 325 # Try other autostart locations if none of the above ones work 308 326 if test $clientinstalled -eq 0; then 309 vboxclient_dest=" /etc/xdg/autostart"327 vboxclient_dest="${PKG_INSTALL_ROOT}/etc/xdg/autostart" 310 328 if test -d "$vboxclient_dest"; then 311 /usr/sbin/installf -c none $PKGINST $vboxclient_dest/1099.vboxclient=$vboxadditions_path/1099.vboxclient s329 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST $vboxclient_dest/1099.vboxclient=$vboxadditions_path/1099.vboxclient s 312 330 clientinstalled=1 313 331 else … … 335 353 if test -f "$vboxadditions64_path/$vboxfsmod"; then 336 354 echo "Installing 64-bit shared folders module..." 337 /usr/sbin/installf -c none $PKGINST "/usr/kernel/fs/$solaris64dir/vboxfs" f338 mv -f $vboxadditions64_path/$vboxfsmod /usr/kernel/fs/$solaris64dir/vboxfs339 /usr/sbin/removef $ PKGINST $vboxadditions64_path/$vboxfsmod 1>/dev/null340 /usr/sbin/removef $ PKGINST $vboxadditions64_path/$vboxfsunused 1>/dev/null355 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST "/usr/kernel/fs/$solaris64dir/vboxfs" f 356 mv -f $vboxadditions64_path/$vboxfsmod ${PKG_INSTALL_ROOT}/usr/kernel/fs/$solaris64dir/vboxfs 357 /usr/sbin/removef $BASEDIR_OPT $PKGINST $vboxadditions64_path/$vboxfsmod 1>/dev/null 358 /usr/sbin/removef $BASEDIR_OPT $PKGINST $vboxadditions64_path/$vboxfsunused 1>/dev/null 341 359 rm -f $vboxadditions64_path/$vboxfsunused 342 360 fi … … 345 363 if test -f "$vboxadditions32_path/$vboxfsmod"; then 346 364 echo "Installing 32-bit shared folders module..." 347 /usr/sbin/installf -c none $PKGINST "/usr/kernel/fs/vboxfs" f348 mv -f $vboxadditions32_path/$vboxfsmod /usr/kernel/fs/vboxfs349 /usr/sbin/removef $ PKGINST $vboxadditions32_path/$vboxfsmod 1>/dev/null350 /usr/sbin/removef $ PKGINST $vboxadditions32_path/$vboxfsunused 1>/dev/null365 /usr/sbin/installf $BASEDIR_OPT -c none $PKGINST "/usr/kernel/fs/vboxfs" f 366 mv -f $vboxadditions32_path/$vboxfsmod ${PKG_INSTALL_ROOT}/usr/kernel/fs/vboxfs 367 /usr/sbin/removef $BASEDIR_OPT $PKGINST $vboxadditions32_path/$vboxfsmod 1>/dev/null 368 /usr/sbin/removef $BASEDIR_OPT $PKGINST $vboxadditions32_path/$vboxfsunused 1>/dev/null 351 369 rm -f $vboxadditions32_path/$vboxfsunused 352 370 fi … … 355 373 # All users which want to access the auto-mounted Shared Folders have to 356 374 # be added to this group. 357 groupadd vboxsf >/dev/null 2>&1 375 if test "$REMOTE_INST" -eq 0; then 376 groupadd vboxsf >/dev/null 2>&1 377 fi 358 378 359 379 # Move the pointer integration module to kernel/drv & remove the unused module name from pkg and file from disk 360 380 361 381 # Finalize 362 /usr/sbin/removef -f $PKGINST363 /usr/sbin/installf -f $PKGINST382 /usr/sbin/removef $BASEDIR_OPT -f $PKGINST 383 /usr/sbin/installf $BASEDIR_OPT -f $PKGINST 364 384 365 385 366 386 if test "$currentzone" = "global"; then 367 /usr/sbin/devfsadm -i vboxguest387 /usr/sbin/devfsadm $BASEDIR_OPT -i vboxguest 368 388 369 389 # Setup VBoxService and vboxmslnk and start the services automatically 370 echo "Configuring services (this might take a while)..."390 echo "Configuring VBoxService and vboxmslnk services (this might take a while)..." 371 391 cmax=32 372 392 cslept=0 … … 374 394 sync 375 395 376 # Since S11 the way to import a manifest is via restarting manifest-import which is asynchronous and can 377 # take a while to complete, using disable/enable -s doesn't work either. So we restart it, and poll in 378 # 1 second intervals to see if our service has been successfully imported and timeout after 'cmax' seconds. 379 /usr/sbin/svcadm restart svc:system/manifest-import:default 380 /usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1 && /usr/bin/svcs virtualbox/vboxmslnk >/dev/null 2>&1 381 while test "$?" -ne 0; 382 do 383 sleep 1 384 cslept=`expr $cslept + 1` 385 if test "$cslept" -eq "$cmax"; then 386 success=1 387 break 388 fi 396 if test "$REMOTE_INST" -eq 0; then 397 # Since S11 the way to import a manifest is via restarting manifest-import which is asynchronous and can 398 # take a while to complete, using disable/enable -s doesn't work either. So we restart it, and poll in 399 # 1 second intervals to see if our service has been successfully imported and timeout after 'cmax' seconds. 400 /usr/sbin/svcadm restart svc:system/manifest-import:default 389 401 /usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1 && /usr/bin/svcs virtualbox/vboxmslnk >/dev/null 2>&1 390 done 391 if test "$success" -eq 0; then 392 echo "Enabling services..." 393 /usr/sbin/svcadm enable -s virtualbox/vboxservice 394 /usr/sbin/svcadm enable -s virtualbox/vboxmslnk 395 else 396 echo "## Service import failed." 397 echo "## See /var/svc/log/system-manifest-import:default.log for details." 398 # Exit as partially failed installation 399 retval=2 402 while test "$?" -ne 0; 403 do 404 sleep 1 405 cslept=`expr $cslept + 1` 406 if test "$cslept" -eq "$cmax"; then 407 success=1 408 break 409 fi 410 /usr/bin/svcs virtualbox/vboxservice >/dev/null 2>&1 && /usr/bin/svcs virtualbox/vboxmslnk >/dev/null 2>&1 411 done 412 if test "$success" -eq 0; then 413 echo "Enabling services..." 414 /usr/sbin/svcadm enable -s virtualbox/vboxservice 415 /usr/sbin/svcadm enable -s virtualbox/vboxmslnk 416 else 417 echo "## Service import failed." 418 echo "## See /var/svc/log/system-manifest-import:default.log for details." 419 # Exit as partially failed installation 420 retval=2 421 fi 400 422 fi 401 423 … … 403 425 BOOTADMBIN=/sbin/bootadm 404 426 if test -x "$BOOTADMBIN"; then 405 if test -h " /dev/vboxguest"; then427 if test -h "${PKG_INSTALL_ROOT}/dev/vboxguest"; then 406 428 echo "Updating boot archive..." 407 $BOOTADMBIN update-archive > /dev/null429 $BOOTADMBIN update-archive $BASEDIR_OPT > /dev/null 408 430 else 409 431 echo "## Guest kernel module doesn't seem to be up. Skipped explicit boot-archive update." … … 415 437 416 438 echo "Done." 417 if test $retval -eq 0; then 418 if test ! -z "$xorgbin"; then 419 echo "Please re-login to activate the X11 guest additions." 420 fi 421 echo "If you have just un-installed the previous guest additions a REBOOT is required." 439 if test "$REMOTE_INST" -eq 0; then 440 if test $retval -eq 0; then 441 if test ! -z "$xorgbin"; then 442 echo "Please re-login to activate the X11 guest additions." 443 fi 444 echo "If you have just un-installed the previous guest additions a REBOOT is required." 445 fi 422 446 fi 423 447 exit $retval -
trunk/src/VBox/Additions/solaris/Installer/preremove.sh
r98103 r101937 45 45 46 46 # stop and unregister VBoxService 47 /usr/sbin/svcadm disable -s virtualbox/vboxservice 48 # Don't need to delete, taken care of by the manifest action 49 # /usr/sbin/svccfg delete svc:/application/virtualbox/vboxservice:default 50 /usr/sbin/svcadm restart svc:/system/manifest-import:default 47 if [ "${PKG_INSTALL_ROOT:-/}" = "/" ] ; then 48 /usr/sbin/svcadm disable -s svc:/application/virtualbox/vboxservice:default 49 /usr/sbin/svcadm disable -s svc:/application/virtualbox/vboxmslnk:default 50 # Don't need to delete, taken care of by the manifest action 51 #/usr/sbin/svccfg delete svc:/application/virtualbox/vboxservice:default 52 #/usr/sbin/svccfg delete svc:/application/virtualbox/vboxmslnk:default 53 /usr/sbin/svcadm restart -s svc:/system/manifest-import:default 51 54 52 # stop VBoxClient 53 pkill -INT VBoxClient 55 # stop VBoxClient 56 pkill -INT VBoxClient 57 fi 54 58 55 59 echo "Removing VirtualBox kernel modules..." 56 60 57 61 # vboxguest.sh would've been installed, we just need to call it. 58 /opt/VirtualBoxAdditions/vboxguest.sh stopall silentunload 62 63 ${PKG_INSTALL_ROOT}/opt/VirtualBoxAdditions/vboxguest.sh stopall silentunload 59 64 60 65 # Figure out group to use for /etc/devlink.tab (before Solaris 11 SRU6 … … 72 77 73 78 # remove devlink.tab entry for vboxguest 74 sed -e '/name=vboxguest/d' /etc/devlink.tab >/etc/devlink.vbox75 chmod 0644 /etc/devlink.vbox76 chown root:$group /etc/devlink.vbox77 mv -f /etc/devlink.vbox/etc/devlink.tab79 sed -e '/name=vboxguest/d' ${PKG_INSTALL_ROOT}/etc/devlink.tab > ${PKG_INSTALL_ROOT}/etc/devlink.vbox 80 chmod 0644 ${PKG_INSTALL_ROOT}/etc/devlink.vbox 81 chown root:$group ${PKG_INSTALL_ROOT}/etc/devlink.vbox 82 mv -f ${PKG_INSTALL_ROOT}/etc/devlink.vbox ${PKG_INSTALL_ROOT}/etc/devlink.tab 78 83 79 84 # remove the link 80 if test -h " /dev/vboxguest" || test -f "/dev/vboxguest"; then81 rm -f /dev/vboxdrv85 if test -h "${PKG_INSTALL_ROOT}/dev/vboxguest" || test -f "${PKG_INSTALL_ROOT}/dev/vboxguest"; then 86 rm -f ${PKG_INSTALL_ROOT}/dev/vboxdrv 82 87 fi 83 if test -h " /dev/vboxms" || test -f "/dev/vboxms"; then84 rm -f /dev/vboxms88 if test -h "${PKG_INSTALL_ROOT}/dev/vboxms" || test -f "${PKG_INSTALL_ROOT}/dev/vboxms"; then 89 rm -f ${PKG_INSTALL_ROOT}/dev/vboxms 85 90 fi 86 91 87 92 # Try and restore xorg.conf! 88 93 echo "Restoring X.Org..." 89 /opt/VirtualBoxAdditions/x11restore.pl94 ${PKG_INSTALL_ROOT}/opt/VirtualBoxAdditions/x11restore.pl 90 95 91 96 -
trunk/src/VBox/Additions/solaris/Installer/vboxguest.sh
r98103 r101937 46 46 VFSMODNAME="vboxfs" 47 47 VMSMODNAME="vboxms" 48 MODDIR32=" /usr/kernel/drv"49 MODDIR64=" /usr/kernel/drv/amd64"50 VFSDIR32=" /usr/kernel/fs"51 VFSDIR64=" /usr/kernel/fs/amd64"48 MODDIR32="${PKG_INSTALL_ROOT}/usr/kernel/drv" 49 MODDIR64="${PKG_INSTALL_ROOT}/usr/kernel/drv/amd64" 50 VFSDIR32="${PKG_INSTALL_ROOT}/usr/kernel/fs" 51 VFSDIR64="${PKG_INSTALL_ROOT}/usr/kernel/fs/amd64" 52 52 53 53 abort() … … 79 79 if test -z "$1"; then 80 80 abort "missing argument to module_loaded()" 81 fi 82 83 if test "$REMOTE_INST" -eq 1; then 84 return 1 81 85 fi 82 86 … … 122 126 start_module() 123 127 { 128 if test "$REMOTE_INST" -eq 1; then 129 /usr/sbin/add_drv $BASEDIR_OPT -i'pci80ee,cafe' -m'* 0666 root sys' $MODNAME 2>/dev/null || \ 130 abort "Failed to install VirtualBox guest kernel module into ${PKG_INSTALL_ROOT}." 131 info "VirtualBox guest kernel module installed." 132 return 133 fi 134 124 135 /usr/sbin/add_drv -i'pci80ee,cafe' -m'* 0666 root sys' $MODNAME 125 136 if test ! vboxguest_loaded; then … … 134 145 stop_module() 135 146 { 147 if test "$REMOTE_INST" -eq 1; then 148 /usr/sbin/rem_drv $BASEDIR_OPT $MODNAME || abort "Failed to uninstall VirtualBox guest kernel module." 149 info "VirtualBox guest kernel module uninstalled." 150 return 151 fi 152 136 153 if vboxguest_loaded; then 137 154 /usr/sbin/rem_drv $MODNAME || abort "Failed to unload VirtualBox guest kernel module." … … 144 161 start_vboxfs() 145 162 { 163 if test "$REMOTE_INST" -eq 1; then 164 return 165 fi 166 146 167 if vboxfs_loaded; then 147 168 info "VirtualBox FileSystem kernel module already loaded." … … 158 179 stop_vboxfs() 159 180 { 181 if test "$REMOTE_INST" -eq 1; then 182 return 183 fi 184 160 185 if vboxfs_loaded; then 161 186 vboxfs_mod_id=`/usr/sbin/modinfo | grep $VFSMODNAME | cut -f 1 -d ' ' ` … … 171 196 start_vboxms() 172 197 { 198 if test "$REMOTE_INST" -eq 1; then 199 /usr/sbin/add_drv $BASEDIR_OPT -m'* 0666 root sys' $VMSMODNAME 2>/dev/null || 200 abort "Failed to install VirtualBox pointer integration module." 201 info "VirtualBox pointer integration module installed." 202 return 203 fi 204 173 205 /usr/sbin/add_drv -m'* 0666 root sys' $VMSMODNAME 174 206 if test ! vboxms_loaded; then … … 183 215 stop_vboxms() 184 216 { 217 if test "$REMOTE_INST" -eq 1; then 218 /usr/sbin/rem_drv $BASEDIR_OPT $VMSMODNAME || abort "Failed to uninstall VirtualBox pointer integration module." 219 info "VirtualBox pointer integration module uninstalled." 220 return 221 fi 222 185 223 if vboxms_loaded; then 186 224 /usr/sbin/rem_drv $VMSMODNAME || abort "Failed to unload VirtualBox pointer integration module." … … 217 255 } 218 256 257 # "Remote" installs ('pkgadd -R') can skip many of the steps below. 258 REMOTE_INST=0 259 BASEDIR_OPT="" 260 if test "x${PKG_INSTALL_ROOT:-/}" != "x/"; then 261 BASEDIR_OPT="-b $PKG_INSTALL_ROOT" 262 REMOTE_INST=1 263 fi 264 export REMOTE_INST 265 export BASEDIR_OPT 266 219 267 check_root 220 268 check_if_installed -
trunk/src/VBox/Additions/solaris/Installer/vboxservice.xml
r98103 r101937 44 44 version='1'> 45 45 46 <create_default_instance enabled=' false' />46 <create_default_instance enabled='true' /> 47 47 48 48 <single_instance/> -
trunk/src/VBox/Additions/solaris/Mouse/vboxmslnk.xml
r101532 r101937 44 44 version='1'> 45 45 46 <create_default_instance enabled=' false' />46 <create_default_instance enabled='true' /> 47 47 48 48 <single_instance/> -
trunk/src/VBox/Additions/x11/Installer/x11config15sol.pl
r98103 r101937 57 57 foreach $cfg (@cfg_files) 58 58 { 59 60 if (($os_type =~ 'SunOS') && (defined $ENV{PKG_INSTALL_ROOT})) 61 { 62 $cfg = $ENV{PKG_INSTALL_ROOT}.$cfg; 63 } 59 64 if (open(CFG, $cfg)) 60 65 { … … 98 103 99 104 # Solaris specific: Rename our modified .xorg.conf to xorg.conf for it to be used 100 if (($os_type =~ 'SunOS') && ($cfg =~ '/etc/X11/.xorg.conf')) 105 if ((defined $ENV{PKG_INSTALL_ROOT}) && 106 ($os_type =~ 'SunOS') && ($cfg =~ "$ENV{PKG_INSTALL_ROOT}/etc/X11/.xorg.conf")) 101 107 { 102 system("mv -f $cfg /etc/X11/xorg.conf"); 108 system("mv -f $cfg $ENV{PKG_INSTALL_ROOT}/etc/X11/xorg.conf"); 109 } 110 else 111 { 112 if (($os_type =~ 'SunOS') && ($cfg =~ '/etc/X11/.xorg.conf')) 113 { 114 system("mv -f $cfg /etc/X11/xorg.conf"); 115 } 103 116 } 104 117 … … 107 120 } 108 121 109 $config_count != 0 or die "Could not find any X11 configuration files ";122 $config_count != 0 or die "Could not find any X11 configuration files."; 110 123 -
trunk/src/VBox/Additions/x11/Installer/x11restore.pl
r98103 r101937 42 42 foreach $cfg (@cfg_files) 43 43 { 44 if (($os_type =~ 'SunOS') && (defined $ENV{PKG_INSTALL_ROOT})) 45 { 46 $cfg = $ENV{PKG_INSTALL_ROOT}.$cfg; 47 } 44 48 if (open(CFG, $cfg)) 45 49 { … … 54 58 { 55 59 close(BAK); 60 print("Restoring $cfg.back to $cfg.\n"); 56 61 rename $cfg.".bak", $cfg; 57 62 } … … 73 78 } 74 79 } 75 76 $config_count != 0 or die "Could not find backed-up xorg.conf to restore it.";77
Note:
See TracChangeset
for help on using the changeset viewer.