Changeset 8205
- Timestamp:
- 04/21/08 08:48:05 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/VBox/Additions/solaris/Installer/postinstall.sh
r8177 r8205 131 131 echo "Done." 132 132 if test $retval -eq 0; then 133 echo "Please re start X Window System for activatingthe X11 guest additions."133 echo "Please re-login to activate the X11 guest additions." 134 134 fi 135 135 exit $retval trunk/src/VBox/Installer/solaris/makepackage.sh
r8172 r8205 25 25 if [ -z "$3" ]; then 26 26 echo "Usage: $0 installdir packagename x86|amd64" 27 echo "-- packagename must not have any extension (e.g. VirtualBox-SunOS-amd64-r28899)" 27 28 exit 1 28 29 fi 29 30 30 MY_PKGNAME=SUNWvbox 31 MY_GGREP=/usr/sfw/bin/ggrep 32 MY_AWK=/usr/bin/awk 33 MY_GTAR=/usr/sfw/bin/gtar 31 VBOX_PKGFILE=$2.pkg 32 VBOX_ARCHIVE=$2.tar.gz 33 VBOX_PKGNAME=SUNWvbox 34 35 VBOX_GGREP=/usr/sfw/bin/ggrep 36 VBOX_AWK=/usr/bin/awk 37 VBOX_GTAR=/usr/sfw/bin/gtar 34 38 35 39 # check for GNU grep we use which might not ship with all Solaris 36 if test ! -f "$ MY_GGREP" && test ! -h "$MY_GGREP"; then37 echo "## GNU grep not found in $ MY_GGREP."40 if test ! -f "$VBOX_GGREP" && test ! -h "$VBOX_GGREP"; then 41 echo "## GNU grep not found in $VBOX_GGREP." 38 42 exit 1 39 43 fi 40 44 41 45 # check for GNU tar we use which might not ship with all Solaris 42 if test ! -f "$ MY_GTAR" && test ! -h "$MY_GTAR"; then43 echo "## GNU tar not found in $ MY_GTAR."46 if test ! -f "$VBOX_GTAR" && test ! -h "$VBOX_GTAR"; then 47 echo "## GNU tar not found in $VBOX_GTAR." 44 48 exit 1 45 49 fi … … 53 57 echo 'i space=./vbox.space' >> prototype 54 58 echo 'e sed /etc/devlink.tab ? ? ?' >> prototype 55 find . -print | $ MY_GGREP -v -E 'prototype|makepackage.sh|vbox.pkginfo|postinstall.sh|preremove.sh|ReadMe.txt|vbox.space' | pkgproto >> prototype59 find . -print | $VBOX_GGREP -v -E 'prototype|makepackage.sh|vbox.pkginfo|postinstall.sh|preremove.sh|ReadMe.txt|vbox.space' | pkgproto >> prototype 56 60 57 61 # don't grok for the sed class files 58 $ MY_AWK 'NF == 6 && $2 == "none" { $5 = "root"; $6 = "bin" } { print }' prototype > prototype259 $ MY_AWK 'NF == 6 && $2 == "none" { $3 = "opt/VirtualBox/"$3"="$3 } { print }' prototype2 > prototype62 $VBOX_AWK 'NF == 6 && $2 == "none" { $5 = "root"; $6 = "bin" } { print }' prototype > prototype2 63 $VBOX_AWK 'NF == 6 && $2 == "none" { $3 = "opt/VirtualBox/"$3"="$3 } { print }' prototype2 > prototype 60 64 61 65 # install the kernel module to the right place. 62 66 if test "$3" = "x86"; then 63 $ MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/vboxdrv=vboxdrv" } { print }' prototype > prototype267 $VBOX_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/vboxdrv=vboxdrv" } { print }' prototype > prototype2 64 68 else 65 $ MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/amd64/vboxdrv=vboxdrv" } { print }' prototype > prototype269 $VBOX_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/amd64/vboxdrv=vboxdrv" } { print }' prototype > prototype2 66 70 fi 67 71 68 $ MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf" { $3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf" } { print }' prototype2 > prototype72 $VBOX_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf" { $3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf" } { print }' prototype2 > prototype 69 73 70 74 rm prototype2 … … 80 84 81 85 # translate into package datastream 82 pkgtrans -s -o /var/spool/pkg `pwd`/$2 "$MY_PKGNAME"86 pkgtrans -s -o /var/spool/pkg "`pwd`/$VBOX_PKGFILE" "$VBOX_PKGNAME" 83 87 if test $? -ne 0; then 84 88 exit 1 85 89 fi 86 90 87 $ MY_GTAR zcvf $2.tar.gz $2autoresponse ReadMe.txt91 $VBOX_GTAR zcvf "$VBOX_ARCHIVE" "$VBOX_PKGFILE" autoresponse ReadMe.txt 88 92 89 93 if test $? -eq 0; then 90 94 echo "## Packaging and transfer completed successfully!" 91 95 fi 92 rm -rf "/var/spool/pkg/$ MY_PKGNAME"96 rm -rf "/var/spool/pkg/$VBOX_PKGNAME" 93 97 exit $? 94 98

