Changeset 39235 in vbox
- Timestamp:
- Nov 8, 2011 12:59:21 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/solaris
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/Installer/makepackage.sh
r33656 r39235 59 59 } 60 60 61 dirlist_fixup() 62 { 63 "$VBOX_AWK" 'NF == 6 && $1 == "d" && '"$2"' { '"$3"' } { print }' "$1" > "tmp-$1" 64 mv -f "tmp-$1" "$1" 65 } 61 66 62 67 # Create relative hardlinks … … 81 86 82 87 # Include opt/VirtualBoxAdditions and subdirectories as we want uninstall to clean up directory structure as well 83 find . -type d | $VBOX_GGREP -E 'opt/VirtualBoxAdditions ' | pkgproto >> prototype88 find . -type d | $VBOX_GGREP -E 'opt/VirtualBoxAdditions|var/svc/manifest/application/virtualbox' | pkgproto >> prototype 84 89 85 90 # Include /etc/fs/vboxfs (as we need to create the subdirectory) … … 94 99 filelist_fixup prototype '$3 == "opt/VirtualBoxAdditions/amd64/VBoxService"' '$4 = "4755"' 95 100 101 # Manifest class action scripts 102 filelist_fixup prototype '$3 == "var/svc/manifest/application/virtualbox/vboxservice.xml"' '$2 = "manifest";$6 = "sys"' 103 96 104 # vboxguest 97 105 filelist_fixup prototype '$3 == "usr/kernel/drv/vboxguest"' '$6="sys"' 98 106 filelist_fixup prototype '$3 == "usr/kernel/drv/amd64/vboxguest"' '$6="sys"' 107 108 # Use 'root' as group so as to match attributes with the previous installation and prevent a conflict. Otherwise pkgadd bails out thinking 109 # we're violating directory attributes of another (non existing) package 110 dirlist_fixup prototype '$3 == "var/svc/manifest/application/virtualbox"' '$6 = "root"' 99 111 100 112 echo " --- start of prototype ---" -
trunk/src/VBox/Additions/solaris/Installer/postinstall.sh
r37423 r39235 77 77 } 78 78 79 abort() 80 { 81 echo 1>&2 "## $1" 82 exit 1 83 } 84 85 get_sysinfo() 86 { 87 BIN_PKG=`which pkg 2> /dev/null` 88 if test -x "$BIN_PKG"; then 89 PKGFMRI=`$BIN_PKG contents -H -t set -a name=pkg.fmri -o pkg.fmri pkg:/system/kernel 2> /dev/null` 90 if test ! -z "$PKGFMRI"; then 91 # The format is "pkg://solaris/system/[email protected],5.11-0.161:20110315T070332Z" 92 # or "pkg://solaris/system/[email protected],5.11-0.175.0.0.0.1.0:20111012T032837Z" 93 STR_KERN=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\:.*//;s/.*,//'` 94 if test ! -z "$STR_KERN"; then 95 # The format is "5.11-0.161" or "5.11-0.175.0.0.0.1.0" 96 HOST_OS_MAJORVERSION=`echo "$STR_KERN" | cut -f1 -d'-'` 97 HOST_OS_MINORVERSION=`echo "$STR_KERN" | cut -f2 -d'-' | cut -f2 -d '.'` 98 else 99 abort "Failed to parse the Solaris kernel version." 100 fi 101 else 102 abort "Failed to detect the Solaris kernel version." 103 fi 104 else 105 HOST_OS_MAJORVERSION=`uname -r` 106 if test -z "$HOST_OS_MAJORVERSION" || test "$HOST_OS_MAJORVERSION" != "5.10"; then 107 # S11 without 'pkg' ?? Something's wrong... bail. 108 abort "Solaris $HOST_OS_MAJOR_VERSION detected without executable $BIN_PKG !? Confused." 109 fi 110 # Use uname to verify it's S10. 111 # Major version is S10, Minor version is no longer relevant (or used), use uname -v so it gets something 112 # like "Generic_blah" for purely cosmetic purposes 113 HOST_OS_MINORVERSION=`uname -v` 114 fi 115 echo "Detected Solaris $HOST_OS_MAJORVERSION version $HOST_OS_MINORVERSION" 116 } 117 79 118 solaris64dir="amd64" 80 119 solaris32dir="i386" … … 83 122 vboxadditions64_path=$vboxadditions_path/$solaris64dir 84 123 124 # get OS details 125 get_sysinfo 85 126 # get the current zone 86 127 currentzone=`zonename` … … 393 434 394 435 if test "$currentzone" = "global"; then 395 # Setup our VBoxService SMF service 436 /usr/sbin/devfsadm -i vboxguest 437 438 # Setup our VBoxService SMF service (needs the full FMRI here) 396 439 echo "Configuring service..." 397 398 /usr/sbin/svccfg import /var/svc/manifest/system/virtualbox/vboxservice.xml 399 /usr/sbin/svcadm enable svc:/system/virtualbox/vboxservice 400 401 /usr/sbin/devfsadm -i vboxguest 440 /usr/sbin/svcadm enable -s svc:/application/virtualbox/vboxservice 402 441 403 442 # Update boot archive -
trunk/src/VBox/Additions/solaris/Installer/preremove.sh
r33656 r39235 23 23 # 24 24 25 echo "VirtualBox Guest Additions - preremove script" 26 echo "This script will unload the VirtualBox Guest kernel module..." 25 echo "Removing VirtualBox service..." 27 26 28 27 # stop and unregister VBoxService daemon 29 /usr/sbin/svcadm disable -s svc:/system/virtualbox/vboxservice:default 30 /usr/sbin/svccfg delete svc:/system/virtualbox/vboxservice:default 28 /usr/sbin/svcadm disable -s virtualbox/vboxservice:default 29 # Don't need to delete, taken care of by the manifest action 30 # /usr/sbin/svccfg delete svc:/application/virtualbox/vboxservice:default 31 31 32 32 # stop VBoxClient 33 33 pkill -INT VBoxClient 34 34 35 echo "Removing VirtualBox kernel modules..." 36 35 37 # vboxguest.sh would've been installed, we just need to call it. 36 /opt/VirtualBoxAdditions/vboxguest.sh stopall 38 /opt/VirtualBoxAdditions/vboxguest.sh stopall silentunload 37 39 38 40 # remove devlink.tab entry for vboxguest -
trunk/src/VBox/Additions/solaris/Installer/vboxguest.pkginfo
r26547 r39235 11 11 HOTLINE="Please contact your local service provider" 12 12 BASEDIR="/" 13 CLASSES=none sed13 CLASSES=none manifest 14 14 DESC="@VBOX_PRODUCT@ Guest Additions for Solaris guests" 15 15 -
trunk/src/VBox/Additions/solaris/Installer/vboxguest.sh
r39219 r39235 27 27 VFSMODNAME="vboxfs" 28 28 MODDIR32="/usr/kernel/drv" 29 MODDIR64= $MODDIR32/amd6429 MODDIR64="/usr/kernel/drv/amd64" 30 30 VFSDIR32="/usr/kernel/fs" 31 31 VFSDIR64="/usr/kernel/fs/amd64" … … 114 114 { 115 115 if vboxguest_loaded; then 116 /usr/sbin/rem_drv $MODNAME || abort " ##Failed to unload VirtualBox guest kernel module."116 /usr/sbin/rem_drv $MODNAME || abort "Failed to unload VirtualBox guest kernel module." 117 117 info "VirtualBox guest kernel module unloaded." 118 118 elif test -z "$SILENTUNLOAD"; then … … 148 148 } 149 149 150 restart_module()151 {152 stop_module153 sync154 start_module155 return 0156 }157 158 restart_all()159 {160 stop_module161 sync162 start_module163 return 0164 }165 166 150 status_module() 167 151 { … … 180 164 } 181 165 166 restart_all() 167 { 168 stop_all 169 start_module 170 start_vboxfs 171 return 0 172 } 173 182 174 check_root 183 175 check_if_installed … … 199 191 stop) 200 192 stop_module 201 ;;202 restart)203 restart_module204 193 ;; 205 194 status) -
trunk/src/VBox/Additions/solaris/Installer/vboxservice.xml
r33656 r39235 25 25 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> 26 26 27 <service_bundle type='manifest' name=' export'>27 <service_bundle type='manifest' name='SUNWvboxguest:vboxservice'> 28 28 29 29 <service 30 name=' system/virtualbox/vboxservice'30 name='application/virtualbox/vboxservice' 31 31 type='service' 32 32 version='1'> -
trunk/src/VBox/Additions/solaris/Makefile.kmk
r38082 r39235 69 69 SOLARIS_ADD_USRBIN_DIR := $(SOLARIS_ADDINST_OUT_DIR)/usr/bin 70 70 SOLARIS_ADD_ETCFS_DIR := $(SOLARIS_ADDINST_OUT_DIR)/etc/fs/vboxfs 71 SOLARIS_ADD_SERVICESINST_DIR := $(SOLARIS_ADDINST_OUT_DIR)/var/svc/manifest/ system/virtualbox71 SOLARIS_ADD_SERVICESINST_DIR := $(SOLARIS_ADDINST_OUT_DIR)/var/svc/manifest/application/virtualbox 72 72 73 73 ifeq ($(KBUILD_TARGET_ARCH),x86) … … 149 149 var/svc \ 150 150 var/svc/manifest \ 151 var/svc/manifest/ system\152 var/svc/manifest/ system/virtualbox \151 var/svc/manifest/application \ 152 var/svc/manifest/application/virtualbox \ 153 153 ) 154 154 … … 302 302 $(call MSG_L1,Creating install package: $@) 303 303 $(QUIET)$(MKDIR) -p $(SOLARIS_ADD_ETCFS_DIR) 304 $(QUIET)$(MKDIR) -p $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER) 304 305 $(QUIET)$(LN_SYMLINK) -f ../..$(SOLARIS_VBOXADDINST_SUBDIR)/1099.vboxclient $(SOLARIS_ADD_USRBIN_DIR)/VBoxClient-all 305 306 ifdef VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE … … 315 316 $(LN_SYMLINK) -f ../../..$(SOLARIS_VBOXADDINST_SUBDIR)/$(SOLARIS_ADDDIR_NAME_ISA)/vboxfsmount $(SOLARIS_ADD_ETCFS_DIR)/mount 316 317 endif 318 $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml $(SOLARIS_ADD_SERVICESINST_DIR)/vboxservice.xml 317 319 $(QUIET)$(SOLARIS_ADDINST_OUT_DIR)/makepackage.sh $(SOLARIS_ADDINST_OUT_DIR) $(PKGFILENAME) $(VBOX_SVN_REV) 318 320 $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADDINST_OUT_DIR)/$(PKGFILENAME) $(PATH_STAGE_BIN)/additions/$(PKGFILENAME)
Note:
See TracChangeset
for help on using the changeset viewer.