- Timestamp:
- Mar 16, 2009 11:08:13 AM (16 years ago)
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/Makefile.kmk
r17840 r17917 134 134 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \ 135 135 $(if $(VBOX_WITH_USB),VBoxUSBHelper,) \ 136 VBoxNetDHCP \ 136 $(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \ 137 $(if $(VBOX_WITH_NETADP),VBoxNetDHCP,) \ 137 138 VBoxSVC \ 138 139 VBoxXPCOMIPCD \ … … 143 144 vboxdrv \ 144 145 $(if $(VBOX_WITH_NETFLT),vboxflt,) \ 146 $(if $(VBOX_WITH_NETADP),vboxnet,) \ 145 147 $(if $(VBOX_WITH_USB),vboxusbmon,) \ 146 148 VBoxDD.so \ … … 212 214 vboxdrv.conf \ 213 215 $(if $(VBOX_WITH_NETFLT),vboxflt.conf,) \ 216 $(if $(VBOX_WITH_NETADP),vboxnet.conf,) \ 214 217 $(if $(VBOX_WITH_USB),vboxusbmon.conf,) \ 215 218 vboxdrv.sh \ … … 390 393 $(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf \ 391 394 $(if $(VBOX_WITH_NETFLT),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf,) \ 395 $(if $(VBOX_WITH_NETADP),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/vboxnet.conf,) \ 392 396 $(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusbmon.conf,) \ 393 397 $(if $(not $(VBOX_WITH_NETFLT))$(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh,) \ … … 412 416 $(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf $(SOLARIS_INST_DIR)/vboxdrv.conf 413 417 $(QUIET)$(if $(VBOX_WITH_NETFLT),$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf $(SOLARIS_INST_DIR)/vboxflt.conf,) 418 $(QUIET)$(if $(VBOX_WITH_NETADP),$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/vboxnet.conf $(SOLARIS_INST_DIR)/vboxnet.conf,) 414 419 $(QUIET)$(if $(VBOX_WITH_USB),$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusbmon.conf $(SOLARIS_INST_DIR)/vboxusbmon.conf,) 415 420 $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_BIN)/LICENSE $(SOLARIS_INST_DIR)/LICENSE) -
trunk/src/VBox/Installer/solaris/makepackage.sh
r17840 r17917 138 138 filelist_fixup prototype '$3 == "opt/VirtualBox/amd64/vboxflt=amd64/vboxflt"' '$3 = "platform/i86pc/kernel/drv/amd64/vboxflt=amd64/vboxflt"; $6 = "sys"' 139 139 140 # NetAdapter vboxnet 141 filelist_fixup prototype '$3 == "opt/VirtualBox/i386/vboxnet=i386/vboxnet"' '$3 = "platform/i86pc/kernel/drv/vboxnet=i386/vboxnet"; $6 = "sys"' 142 filelist_fixup prototype '$3 == "opt/VirtualBox/amd64/vboxnet=amd64/vboxnet"' '$3 = "platform/i86pc/kernel/drv/amd64/vboxnet=amd64/vboxnet"; $6 = "sys"' 143 140 144 # USB vboxusbmon 141 145 filelist_fixup prototype '$3 == "opt/VirtualBox/i386/vboxusbmon=i386/vboxusbmon"' '$3 = "platform/i86pc/kernel/drv/vboxusbmon=i386/vboxusbmon"; $6 = "sys"' … … 145 149 filelist_fixup prototype '$3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf"' '$3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf"' 146 150 filelist_fixup prototype '$3 == "opt/VirtualBox/vboxflt.conf=vboxflt.conf"' '$3 = "platform/i86pc/kernel/drv/vboxflt.conf=vboxflt.conf"' 151 filelist_fixup prototype '$3 == "opt/VirtualBox/vboxnet.conf=vboxnet.conf"' '$3 = "platform/i86pc/kernel/drv/vboxnet.conf=vboxnet.conf"' 147 152 filelist_fixup prototype '$3 == "opt/VirtualBox/vboxusbmon.conf=vboxusbmon.conf"' '$3 = "platform/i86pc/kernel/drv/vboxusbmon.conf=vboxusbmon.conf"' 148 153 … … 167 172 fi 168 173 169 # VBoxUSBHelper needs to be marked setuid .174 # VBoxUSBHelper needs to be marked setuid root. 170 175 if test -f $VBOX_INSTALLED_DIR/amd64/VBoxUSBHelper || test -f $VBOX_INSTALLED_DIR/i386/VBoxUSBHelper; then 171 176 $VBOX_AWK 'NF == 6 \ … … 177 182 fi 178 183 184 # VBoxNetAdpCtl needs to be marked setuid root. 185 if test -f $VBOX_INSTALLED_DIR/amd64/VBoxNetAdpCtl || test -f $VBOX_INSTALLED_DIR/i386/VBoxNetAdpCtl; then 186 $VBOX_AWK 'NF == 6 \ 187 && ( $3 == "opt/VirtualBox/amd64/VBoxNetAdpCtl=amd64/VBoxNetAdpCtl" \ 188 || $3 == "opt/VirtualBox/i386/VBoxNetAdpCtl=i386/VBoxNetAdpCtl" \ 189 ) \ 190 { $4 = "4755" } { print }' prototype > prototype2 191 mv -f prototype2 prototype 192 fi 193 194 179 195 # desktop links and icons 180 196 filelist_fixup prototype '$3 == "opt/VirtualBox/virtualbox.desktop=virtualbox.desktop"' '$3 = "usr/share/applications/virtualbox.desktop=virtualbox.desktop"' -
trunk/src/VBox/Installer/solaris/postinstall.sh
r17638 r17917 37 37 /opt/VirtualBox/vboxdrv.sh start 38 38 rc=$? 39 40 # VBoxDrv loaded successfully, proceed with the rest... 39 41 if test "$rc" -eq 0; then 42 # Load VBoxNetAdapter vboxnet 43 if test -f /platform/i86pc/kernel/drv/vboxnet.conf; then 44 /opt/VirtualBox/vboxdrv.sh netstart 45 rc=$? 46 fi 47 48 # Load VBoxNetFilter vboxflt 40 49 if test -f /platform/i86pc/kernel/drv/vboxflt.conf; then 41 50 /opt/VirtualBox/vboxdrv.sh fltstart … … 43 52 fi 44 53 54 # Load VBoxUSBMon vboxusbmon (do NOT load for Solaris 10) 45 55 if test -f /platform/i86pc/kernel/drv/vboxusbmon.conf && test "$osversion" != "5.10"; then 46 56 /opt/VirtualBox/vboxdrv.sh usbstart 47 57 rc=$? 48 58 if test "$rc" -eq 0; then 49 # add vboxusbmon to the devlink.tab59 # Add vboxusbmon to the devlink.tab 50 60 sed -e ' 51 61 /name=vboxusbmon/d' /etc/devlink.tab > /etc/devlink.vbox … … 102 112 fi 103 113 104 # add vboxdrv to the devlink.tab114 # Add vboxdrv to the devlink.tab 105 115 sed -e ' 106 116 /name=vboxdrv/d' /etc/devlink.tab > /etc/devlink.vbox … … 108 118 mv -f /etc/devlink.vbox /etc/devlink.tab 109 119 110 # create the device link120 # Create the device link 111 121 /usr/sbin/devfsadm -i vboxdrv 112 122 113 # don't create link for Solaris 10123 # Don't create link for Solaris 10 114 124 if test -f /platform/i86pc/kernel/drv/vboxusbmon.conf && test "$osversion" != "5.10"; then 115 125 /usr/sbin/devfsadm -i vboxusbmon -
trunk/src/VBox/Installer/solaris/preremove.sh
r17638 r17917 39 39 # vboxdrv.sh would've been installed, we just need to call it. 40 40 /opt/VirtualBox/vboxdrv.sh usbstop alwaysremdrv 41 /opt/VirtualBox/vboxdrv.sh netstop alwaysremdrv 41 42 /opt/VirtualBox/vboxdrv.sh fltstop alwaysremdrv 42 43 /opt/VirtualBox/vboxdrv.sh stop alwaysremdrv -
trunk/src/VBox/Installer/solaris/vboxdrv.sh
r17645 r17917 25 25 VBIMODNAME="vbi" 26 26 FLTMODNAME="vboxflt" 27 NETMODNAME="vboxnet" 27 28 USBMODNAME="vboxusbmon" 28 29 MODDIR32="/platform/i86pc/kernel/drv" … … 120 121 { 121 122 module_added $FLTMODNAME 123 return $? 124 } 125 126 vboxnet_added() 127 { 128 module_added $NETMODNAME 129 return $? 130 } 131 132 vboxnet_loaded() 133 { 134 module_loaded $NETMODNAME 122 135 return $? 123 136 } … … 253 266 254 267 268 start_vboxnet() 269 { 270 if vboxnet_loaded; then 271 info "VirtualBox NetAdapter kernel module already loaded." 272 else 273 /usr/sbin/add_drv -m'* 0666 root sys' $NETMODNAME || abort "Failed to add VirtualBox NetAdapter Kernel module." 274 /usr/sbin/modload -p drv/$NETMODNAME 275 if test ! vboxnet_loaded; then 276 abort "Failed to load VirtualBox NetAdapter kernel module." 277 else 278 # Plumb the interface! 279 /sbin/ifconfig vboxnet0 plumb up 280 info "VirtualBox NetAdapter kernel module loaded." 281 fi 282 fi 283 } 284 285 stop_vboxnet() 286 { 287 if vboxnet_loaded; then 288 vboxnet_mod_id=`/usr/sbin/modinfo | grep $NETMODNAME | cut -f 1 -d ' '` 289 if test -n "$vboxnet_mod_id"; then 290 /sbin/ifconfig vboxnet0 unplumb 291 /usr/sbin/modunload -i $vboxnet_mod_id 292 293 # see stop_vboxdrv() for why we have "alwaysremdrv". 294 if test -n "$ALWAYSREMDRV"; then 295 /usr/sbin/rem_drv $NETMODNAME 296 else 297 if test "$?" -eq 0; then 298 /usr/sbin/rem_drv $NETMODNAME || abort "Unloaded VirtualBox NetAdapter kernel module, but failed to remove it!" 299 else 300 abort "Failed to unload VirtualBox NetAdapter kernel module. Old one still active!!" 301 fi 302 fi 303 304 info "VirtualBox NetAdapter kernel module unloaded." 305 fi 306 elif vboxnet_added; then 307 /usr/sbin/rem_drv $NETMODNAME || abort "Unloaded VirtualBox NetAdapter kernel module, but failed to remove it!" 308 info "VirtualBox NetAdapter kernel module unloaded." 309 elif test -z "$SILENTUNLOAD"; then 310 info "VirtualBox NetAdapter kernel module not loaded." 311 fi 312 } 313 314 255 315 start_vboxusbmon() 256 316 { … … 310 370 { 311 371 stop_vboxusbmon 372 stop_vboxnet 312 373 stop_vboxflt 313 374 stop_module … … 318 379 start_module 319 380 start_vboxflt 381 start_vboxnet 320 382 start_vboxusbmon 321 383 } … … 364 426 stop_vboxusbmon 365 427 ;; 428 netstart) 429 start_vboxnet 430 ;; 431 netstop) 432 stop_vboxnet 433 ;; 366 434 *) 367 echo "Usage: $0 {start|stop|status|fltstart|fltstop|usbstart|usbstop| stopall|startall}"435 echo "Usage: $0 {start|stop|status|fltstart|fltstop|usbstart|usbstop|netstart|netstop|stopall|startall}" 368 436 exit 1 369 437 esac
Note:
See TracChangeset
for help on using the changeset viewer.