Changeset 8526 in vbox for trunk/src/VBox/Installer/solaris
- Timestamp:
- May 2, 2008 6:58:04 AM (17 years ago)
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/postinstall.sh
r8525 r8526 18 18 # 19 19 20 echo "Sun xVM VirtualBox - postinstall script"21 sync22 23 20 currentzone=`zonename` 24 21 if test "$currentzone" = "global"; then 25 echo "This script will setup and load the VirtualBox kernel module..." 26 # vboxdrv.sh would've been installed, we just need to call it. 22 echo "Configuring VirtualBox kernel module..." 27 23 /opt/VirtualBox/vboxdrv.sh restart silentunload 28 24 fi … … 30 26 # create links 31 27 echo "Creating links..." 32 #/usr/sbin/installf -c none $PKGINST /dev/vboxdrv=../devices/pseudo/vboxdrv@0:vboxdrv s33 28 if test -f /opt/VirtualBox/VirtualBox; then 34 29 /usr/sbin/installf -c none $PKGINST /usr/bin/VirtualBox=/opt/VirtualBox/VBox.sh s -
trunk/src/VBox/Installer/solaris/vboxdrv.sh
r8172 r8526 18 18 # 19 19 20 VBOXDRVFILE=""21 20 SILENTUNLOAD="" 21 MODNAME="vboxdrv" 22 MODDIR32="/platform/i86pc/kernel/drv" 23 MODDIR64=$MODDIR32/amd64 22 24 23 25 abort() … … 32 34 } 33 35 34 get_module_path()36 check_if_installed() 35 37 { 36 38 cputype=`isainfo -k` 37 module dir="/platform/i86pc/kernel/drv";39 modulepath="$MODDIR32/$MODNAME" 38 40 if test "$cputype" = "amd64"; then 39 module dir=$moduledir/amd6441 modulepath="$MODDIR64/$MODNAME" 40 42 fi 41 modulepath=$moduledir/vboxdrv42 43 if test -f "$modulepath"; then 43 VBOXDRVFILE="$modulepath"44 else45 VBOXDRVFILE=""46 fi47 }48 49 check_if_installed()50 {51 if test "$VBOXDRVFILE" -a -f "$VBOXDRVFILE"; then52 44 return 0 53 45 fi 54 abort "VirtualBox kernel module (vboxdrv) notinstalled."46 abort "VirtualBox kernel module NOT installed." 55 47 } 56 48 … … 58 50 { 59 51 if test -f "/etc/name_to_major"; then 60 loadentry=`cat /etc/name_to_major | grep vboxdrv`52 loadentry=`cat /etc/name_to_major | grep $MODNAME` 61 53 else 62 loadentry=`/usr/sbin/modinfo | grep vboxdrv`54 loadentry=`/usr/sbin/modinfo | grep $MODNAME` 63 55 fi 64 56 if test -z "$loadentry"; then … … 78 70 { 79 71 if module_loaded; then 80 info " vboxdrv already loaded..."72 info "VirtualBox kernel module already loaded." 81 73 else 82 /usr/sbin/add_drv -m'* 0666 root sys' vboxdrv74 /usr/sbin/add_drv -m'* 0666 root sys' $MODNAME 83 75 if test ! module_loaded; then 84 abort " Failed to load vboxdrv."85 elif test -c "/devices/pseudo/ vboxdrv@0:vboxdrv"; then86 info " Loaded vboxdrv."76 abort "## Failed to load VirtualBox kernel module." 77 elif test -c "/devices/pseudo/$MODNAME@0:$MODNAME"; then 78 info "VirtualBox kernel module successfully loaded." 87 79 else 88 stop89 80 abort "Aborting due to attach failure." 90 81 fi … … 95 86 { 96 87 if module_loaded; then 97 /usr/sbin/rem_drv vboxdrv98 info " Unloaded vboxdrv."88 /usr/sbin/rem_drv $MODNAME || abort "## Failed to unload VirtualBox kernel module." 89 info "VirtualBox kernel module unloaded." 99 90 elif test -z "$SILENTUNLOAD"; then 100 info " vboxdrvnot loaded."91 info "VirtualBox kernel module not loaded." 101 92 fi 102 93 } … … 113 104 { 114 105 if module_loaded; then 115 info " vboxdrv running."106 info "Running." 116 107 else 117 info " vboxdrv stopped."108 info "Stopped." 118 109 fi 119 110 } 120 111 121 112 check_root 122 get_module_path123 113 check_if_installed 124 114
Note:
See TracChangeset
for help on using the changeset viewer.