VirtualBox

Changeset 8205

Show
Ignore:
Timestamp:
04/21/08 08:48:05 (9 months ago)
Author:
vboxsync
Message:

Solaris installer: Use .pkg for package filename extension

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Additions/solaris/Installer/postinstall.sh

    r8177 r8205  
    131131echo "Done." 
    132132if test $retval -eq 0; then 
    133     echo "Please restart X Window System for activating the X11 guest additions." 
     133    echo "Please re-login to activate the X11 guest additions." 
    134134fi 
    135135exit $retval 
  • trunk/src/VBox/Installer/solaris/makepackage.sh

    r8172 r8205  
    2525if [ -z "$3" ]; then 
    2626    echo "Usage: $0 installdir packagename x86|amd64" 
     27    echo "-- packagename must not have any extension (e.g. VirtualBox-SunOS-amd64-r28899)" 
    2728    exit 1 
    2829fi 
    2930 
    30 MY_PKGNAME=SUNWvbox 
    31 MY_GGREP=/usr/sfw/bin/ggrep 
    32 MY_AWK=/usr/bin/awk 
    33 MY_GTAR=/usr/sfw/bin/gtar 
     31VBOX_PKGFILE=$2.pkg 
     32VBOX_ARCHIVE=$2.tar.gz 
     33VBOX_PKGNAME=SUNWvbox 
     34 
     35VBOX_GGREP=/usr/sfw/bin/ggrep 
     36VBOX_AWK=/usr/bin/awk 
     37VBOX_GTAR=/usr/sfw/bin/gtar 
    3438 
    3539# check for GNU grep we use which might not ship with all Solaris 
    36 if test ! -f "$MY_GGREP" && test ! -h "$MY_GGREP"; then 
    37     echo "## GNU grep not found in $MY_GGREP." 
     40if test ! -f "$VBOX_GGREP" && test ! -h "$VBOX_GGREP"; then 
     41    echo "## GNU grep not found in $VBOX_GGREP." 
    3842    exit 1 
    3943fi 
    4044 
    4145# check for GNU tar we use which might not ship with all Solaris 
    42 if test ! -f "$MY_GTAR" && test ! -h "$MY_GTAR"; then 
    43     echo "## GNU tar not found in $MY_GTAR." 
     46if test ! -f "$VBOX_GTAR" && test ! -h "$VBOX_GTAR"; then 
     47    echo "## GNU tar not found in $VBOX_GTAR." 
    4448    exit 1 
    4549fi 
     
    5357echo 'i space=./vbox.space' >> prototype 
    5458echo '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 >> prototype 
     59find . -print | $VBOX_GGREP -v -E 'prototype|makepackage.sh|vbox.pkginfo|postinstall.sh|preremove.sh|ReadMe.txt|vbox.space' | pkgproto >> prototype 
    5660 
    5761# don't grok for the sed class files 
    58 $MY_AWK 'NF == 6 && $2 == "none" { $5 = "root"; $6 = "bin" } { print }' prototype > prototype2 
    59 $MY_AWK 'NF == 6 && $2 == "none" { $3 = "opt/VirtualBox/"$3"="$3 } { print }' prototype2 > prototype 
     62$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 
    6064 
    6165# install the kernel module to the right place. 
    6266if test "$3" = "x86"; then 
    63     $MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/vboxdrv=vboxdrv" } { print }' prototype > prototype2 
     67    $VBOX_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/vboxdrv=vboxdrv" } { print }' prototype > prototype2 
    6468else 
    65     $MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/amd64/vboxdrv=vboxdrv" } { print }' prototype > prototype2 
     69    $VBOX_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/amd64/vboxdrv=vboxdrv" } { print }' prototype > prototype2 
    6670fi 
    6771 
    68 $MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf" { $3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf" } { print }' prototype2 > prototype 
     72$VBOX_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf" { $3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf" } { print }' prototype2 > prototype 
    6973 
    7074rm prototype2 
     
    8084 
    8185# translate into package datastream 
    82 pkgtrans -s -o /var/spool/pkg `pwd`/$2 "$MY_PKGNAME" 
     86pkgtrans -s -o /var/spool/pkg "`pwd`/$VBOX_PKGFILE" "$VBOX_PKGNAME" 
    8387if test $? -ne 0; then 
    8488    exit 1 
    8589fi 
    8690 
    87 $MY_GTAR zcvf $2.tar.gz $2 autoresponse ReadMe.txt 
     91$VBOX_GTAR zcvf "$VBOX_ARCHIVE" "$VBOX_PKGFILE" autoresponse ReadMe.txt 
    8892 
    8993if test  $? -eq 0; then 
    9094    echo "## Packaging and transfer completed successfully!" 
    9195fi 
    92 rm -rf "/var/spool/pkg/$MY_PKGNAME" 
     96rm -rf "/var/spool/pkg/$VBOX_PKGNAME" 
    9397exit $? 
    9498 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy