- Timestamp:
- Jun 4, 2009 11:40:48 AM (16 years ago)
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/Makefile.kmk
r20264 r20271 253 253 vboxdrv.sh \ 254 254 VBox.sh \ 255 ipsinstall.sh \ 255 256 $(if $(VBOX_WITH_VBOXSDL),libSDL-1.2.so.0,) \ 256 257 $(if $(not $(VBOX_WITH_NETFLT))vnic_setup.sh,) \ … … 442 443 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \ 443 444 $(VBOX_PATH_SOL_INST_SRC)/VBox.sh \ 445 $(VBOX_PATH_SOL_INST_SRC)/ipsinstall.sh \ 444 446 $(VBOX_PATH_SOL_INST_SRC)/virtualbox.desktop \ 445 447 $(PATH_ROOT)/doc/ReadMe-Solaris.txt \ … … 527 529 $(QUIET)$(RM) -f $(SOLARIS_VBOXINST_DIR)/vboxdrv.sh.tmp 528 530 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/VBox.sh $(SOLARIS_VBOXINST_DIR)/VBox.sh 531 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOL_INST_SRC)/ipsinstall.sh $(SOLARIS_VBOXINST_DIR)/ipsinstall.sh 529 532 $(QUIET)$(if $(VBOX_WITH_QTGUI),$(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/virtualbox.desktop $(SOLARIS_USRSHR_APPS_DIR)/virtualbox.desktop,) 530 533 $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_OUT_BIN)/VBox.png $(SOLARIS_USRSHR_PIXMAPS_DIR)/VBox.png -
trunk/src/VBox/Installer/solaris/ipsinstall.sh
r20270 r20271 25 25 # script once to avoid rebooting the system before using VirtualBox 26 26 # 27 currentzone=`zonename`28 osversion=`uname -r`29 if test "$currentzone" = "global"; then30 BIN_REMDRV=/usr/sbin/rem_drv31 BIN_ADDDRV=/usr/sbin/add_drv32 BIN_MODLOAD=/usr/sbin/modload33 BIN_DEVFSADM=/usr/sbin/devfsadm34 27 35 # Halt services in case of installation update 36 zoneaccessfound=`svcs -a | grep "virtualbox/zoneaccess"` 37 if test ! -z "$zoneaccessfound"; then 38 /usr/sbin/svcadm disable -s svc:/application/virtualbox/zoneaccess 28 check_root() 29 { 30 idbin=/usr/xpg4/bin/id 31 if test ! -f "$idbin"; then 32 found=`which id | grep "no id"` 33 if test ! -z "$found"; then 34 echo "## Failed to find a suitable user id binary." 35 else 36 idbin=$found 37 fi 39 38 fi 40 39 41 # Remove drivers ignoring errors as they are not really loaded42 # just updated various boot archive files without really loading43 # them... But we _want_ them to be loaded.44 echo "Removing any stale driver configurations..." 40 if test `$idbin -u` -ne 0; then 41 echo "## This script must be run with administrator privileges." 42 fi 43 } 45 44 46 $BIN_REMDRV vboxflt > /dev/null 2>&1 47 /sbin/ifconfig vboxnet0 unplumb > /dev/null 2>&1 48 $BIN_REMDRV vboxnet > /dev/null 2>&1 49 $BIN_REMDRV vboxusbmon > /dev/null 2>&1 50 $BIN_REMDRV vboxdrv > /dev/null 2>&1 45 check_zone() 46 { 47 currentzone=`zonename` 48 if test "$currentzone" != "global"; then 49 echo "## This script must be run from the global zone." 50 fi 51 } 51 52 52 echo "Loading VirtualBox Drivers:" 53 # Add drivers the proper way and load them immediately 54 /opt/VirtualBox/vboxdrv.sh start 55 rc=$? 56 if test "$rc" -eq 0; then 57 # Add vboxdrv to the devlink.tab 58 sed -e ' 53 check_root 54 check_zone 55 56 osversion=`uname -r` 57 58 BIN_REMDRV=/usr/sbin/rem_drv 59 BIN_ADDDRV=/usr/sbin/add_drv 60 BIN_MODLOAD=/usr/sbin/modload 61 BIN_DEVFSADM=/usr/sbin/devfsadm 62 63 # Halt services in case of installation update 64 zoneaccessfound=`svcs -a | grep "virtualbox/zoneaccess"` 65 if test ! -z "$zoneaccessfound"; then 66 /usr/sbin/svcadm disable -s svc:/application/virtualbox/zoneaccess 67 fi 68 69 # Remove drivers ignoring errors as they are not really loaded 70 # just updated various boot archive files without really loading 71 # them... But we _want_ them to be loaded. 72 echo "Removing any stale driver configurations..." 73 74 $BIN_REMDRV vboxflt > /dev/null 2>&1 75 /sbin/ifconfig vboxnet0 unplumb > /dev/null 2>&1 76 $BIN_REMDRV vboxnet > /dev/null 2>&1 77 $BIN_REMDRV vboxusbmon > /dev/null 2>&1 78 $BIN_REMDRV vboxdrv > /dev/null 2>&1 79 80 echo "Loading VirtualBox Drivers:" 81 # Add drivers the proper way and load them immediately 82 /opt/VirtualBox/vboxdrv.sh start 83 rc=$? 84 if test "$rc" -eq 0; then 85 # Add vboxdrv to the devlink.tab 86 sed -e ' 59 87 /name=vboxdrv/d' /etc/devlink.tab > /etc/devlink.vbox 60 61 88 echo "type=ddi_pseudo;name=vboxdrv \D" >> /etc/devlink.vbox 89 mv -f /etc/devlink.vbox /etc/devlink.tab 62 90 63 64 91 # Create the device link 92 /usr/sbin/devfsadm -i vboxdrv 65 93 66 94 echo "HostDrv : SUCCESS" 67 95 68 69 70 71 96 # Load VBoxNetAdapter vboxnet 97 if test -f /platform/i86pc/kernel/drv/vboxnet.conf; then 98 /opt/VirtualBox/vboxdrv.sh netstart 99 rc=$? 72 100 73 74 101 if test "$rc" -eq 0; then 102 echo "NetAdapter : SUCCESS" 75 103 76 # nwam/dhcpagent fix 77 nwamfile=/etc/nwam/llp 78 nwambackupfile=$nwamfile.vbox 79 if test -f "$nwamfile"; then 80 sed -e '/vboxnet/d' $nwamfile > $nwambackupfile 81 echo "vboxnet0 static 192.168.56.1" >> $nwambackupfile 82 mv -f $nwambackupfile $nwamfile 83 echo " -> patched /etc/nwam/llp to use static IP for vboxnet0" 84 fi 85 else 86 echo "NetAdapter : FAILED" 104 # nwam/dhcpagent fix 105 nwamfile=/etc/nwam/llp 106 nwambackupfile=$nwamfile.vbox 107 if test -f "$nwamfile"; then 108 sed -e '/vboxnet/d' $nwamfile > $nwambackupfile 109 echo "vboxnet0 static 192.168.56.1" >> $nwambackupfile 110 mv -f $nwambackupfile $nwamfile 111 echo " -> patched /etc/nwam/llp to use static IP for vboxnet0" 87 112 fi 113 else 114 echo "NetAdapter : FAILED" 88 115 fi 89 90 # Load VBoxNetFilter vboxflt91 if test -f /platform/i86pc/kernel/drv/vboxflt.conf; then92 /opt/VirtualBox/vboxdrv.sh fltstart93 rc=$?94 if test "$rc" -eq 0; then95 echo "NetFilter : SUCCESS"96 else97 echo "NetFilter : FAILED"98 fi99 fi100 101 # Load VBoxUSBMonitor vboxusbmon (do NOT load for Solaris 10)102 if test -f /platform/i86pc/kernel/drv/vboxusbmon.conf && test "$osversion" != "5.10"; then103 /opt/VirtualBox/vboxdrv.sh usbstart104 rc=$?105 if test "$rc" -eq 0; then106 107 # Add vboxusbmon to the devlink.tab108 sed -e '109 /name=vboxusbmon/d' /etc/devlink.tab > /etc/devlink.vbox110 echo "type=ddi_pseudo;name=vboxusbmon \D" >> /etc/devlink.vbox111 mv -f /etc/devlink.vbox /etc/devlink.tab112 113 /usr/sbin/devfsadm -i vboxusbmon114 115 echo "USBMonitor : SUCCESS"116 else117 echo "USBMonitor : FAILED"118 fi119 fi120 else121 echo "HostDrv : FAILED"122 116 fi 123 117 124 # Enable Zone access service 125 if test -f /var/svc/manifest/application/virtualbox/zoneaccess.xml; then 126 /usr/sbin/svcadm enable -s svc:/application/virtualbox/zoneaccess 127 echo "Service to use VirtualBox from zones : ENABLED" 118 # Load VBoxNetFilter vboxflt 119 if test -f /platform/i86pc/kernel/drv/vboxflt.conf; then 120 /opt/VirtualBox/vboxdrv.sh fltstart 121 rc=$? 122 if test "$rc" -eq 0; then 123 echo "NetFilter : SUCCESS" 124 else 125 echo "NetFilter : FAILED" 126 fi 128 127 fi 129 128 130 # We need to touch the desktop link in order to add it to the menu right away 131 if test -f "/usr/share/applications/virtualbox.desktop"; then 132 touch /usr/share/applications/virtualbox.desktop 129 # Load VBoxUSBMonitor vboxusbmon (do NOT load for Solaris 10) 130 if test -f /platform/i86pc/kernel/drv/vboxusbmon.conf && test "$osversion" != "5.10"; then 131 /opt/VirtualBox/vboxdrv.sh usbstart 132 rc=$? 133 if test "$rc" -eq 0; then 134 135 # Add vboxusbmon to the devlink.tab 136 sed -e ' 137 /name=vboxusbmon/d' /etc/devlink.tab > /etc/devlink.vbox 138 echo "type=ddi_pseudo;name=vboxusbmon \D" >> /etc/devlink.vbox 139 mv -f /etc/devlink.vbox /etc/devlink.tab 140 141 /usr/sbin/devfsadm -i vboxusbmon 142 143 echo "USBMonitor : SUCCESS" 144 else 145 echo "USBMonitor : FAILED" 146 fi 133 147 fi 148 else 149 echo "HostDrv : FAILED" 150 fi 151 152 # Enable Zone access service 153 if test -f /var/svc/manifest/application/virtualbox/zoneaccess.xml; then 154 /usr/sbin/svcadm enable -s svc:/application/virtualbox/zoneaccess 155 echo "Service to use VirtualBox from zones : ENABLED" 156 fi 157 158 # We need to touch the desktop link in order to add it to the menu right away 159 if test -f "/usr/share/applications/virtualbox.desktop"; then 160 touch /usr/share/applications/virtualbox.desktop 134 161 fi 135 162
Note:
See TracChangeset
for help on using the changeset viewer.