Changeset 13353 in vbox
- Timestamp:
- Oct 16, 2008 5:42:14 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38053
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/postinstall.sh
r13231 r13353 31 31 currentzone=`zonename` 32 32 if test "$currentzone" = "global"; then 33 echo "Configuring VirtualBox Hostkernel module(s)..."33 echo "Configuring VirtualBox kernel module(s)..." 34 34 /opt/VirtualBox/vboxdrv.sh stopall silentunload 35 /opt/VirtualBox/vboxdrv.sh start36 35 rc=$? 37 if test "$rc" -ne 0; then 38 echo "## Kernel module configuration failed! Aborting installation..." 39 exit 2 36 if test "$rc" -eq 0; then 37 /opt/VirtualBox/vboxdrv.sh start 38 rc=$? 39 if test "$rc" -eq 0; then 40 if test -f /platform/i86pc/kernel/drv/vboxflt.conf; then 41 /opt/VirtualBox/vboxdrv.sh fltstart 42 rc=$? 43 fi 44 fi 40 45 fi 41 46 42 if test -f /platform/i86pc/kernel/drv/vboxflt.conf; then 43 /opt/VirtualBox/vboxdrv.sh fltstart 47 # Fail on any errors while unloading previous modules because it makes it very hard to 48 # track problems when older vboxdrv is hanging about in memory and add_drv of the new 49 # one suceeds and it appears as though the new one is being used. 50 if test "$rc" -ne 0; then 51 echo "## Configuration failed. Aborting installation." 52 exit 2 44 53 fi 45 54 fi -
trunk/src/VBox/Installer/solaris/vboxdrv.sh
r12858 r13353 18 18 # 19 19 20 STOPPING="" 20 21 SILENTUNLOAD="" 21 22 MODNAME="vboxdrv" … … 46 47 fi 47 48 48 # Let us go a step further and check if user has mixed up x86/amd64 49 # amd64 ISA, x86 kernel module?? 50 if test "$cputype" = "amd64"; then 51 modulepath="$MODDIR32/$MODNAME" 52 if test -f "$modulepath"; then 53 abort "Found 32-bit module instead of 64-bit. Please install the amd64 package!" 54 fi 55 else 56 # x86 ISA, amd64 kernel module?? 57 modulepath="$MODDIR64/$MODNAME" 58 if test -f "$modulepath"; then 59 abort "Found 64-bit module instead of 32-bit. Please install the x86 package!" 60 fi 61 fi 62 63 abort "VirtualBox Host kernel module NOT installed." 49 # Check arch only if we are not stopping things (because rem_drv works for both arch.) 50 if test -z "$STOPPING"; then 51 # Let us go a step further and check if user has mixed up x86/amd64 52 # amd64 ISA, x86 kernel module?? 53 if test "$cputype" = "amd64"; then 54 modulepath="$MODDIR32/$MODNAME" 55 if test -f "$modulepath"; then 56 abort "Found 32-bit module instead of 64-bit. Please install the amd64 package!" 57 fi 58 else 59 # x86 ISA, amd64 kernel module?? 60 modulepath="$MODDIR64/$MODNAME" 61 if test -f "$modulepath"; then 62 abort "Found 64-bit module instead of 32-bit. Please install the x86 package!" 63 fi 64 fi 65 66 abort "VirtualBox Host kernel module NOT installed." 67 else 68 info "## VirtualBox Host kernel module NOT instaled." 69 return 0 70 fi 64 71 } 65 72 … … 130 137 { 131 138 if module_loaded; then 132 /usr/sbin/rem_drv $MODNAME || info "## WARNING!!Failed to unload VirtualBox Host kernel module. Old one still active!"139 /usr/sbin/rem_drv $MODNAME || abort "Failed to unload VirtualBox Host kernel module. Old one still active!" 133 140 info "VirtualBox Host kernel module unloaded." 134 141 elif test -z "$SILENTUNLOAD"; then … … 139 146 vbi_mod_id=`/usr/sbin/modinfo | grep vbi | cut -f 1 -d ' ' ` 140 147 if test -n "$vbi_mod_id"; then 141 /usr/sbin/modunload -i $vbi_mod_id > /dev/null 2>&1 148 /usr/sbin/modunload -i $vbi_mod_id > /dev/null 2>&1 || abort "Failed to unload VirtualBox kernel interfaces module. Old one still active!" 142 149 fi 143 150 } … … 148 155 info "VirtualBox NetFilter kernel module already loaded." 149 156 else 150 /usr/sbin/add_drv -m'* 0600 root sys' $FLTMODNAME 157 /usr/sbin/add_drv -m'* 0600 root sys' $FLTMODNAME || abort "Failed to load VirtualBox Host Kernel module." 151 158 /usr/sbin/modload -p drv/$FLTMODNAME 152 159 if test ! vboxflt_module_loaded; then … … 161 168 { 162 169 if vboxflt_module_loaded; then 163 /usr/sbin/rem_drv $FLTMODNAME || info "## WARNING!!Failed to unload VirtualBox NetFilter module. Old one still active!"170 /usr/sbin/rem_drv $FLTMODNAME || abort "Failed to unload VirtualBox NetFilter module. Old one still active!" 164 171 info "VirtualBox NetFilter kernel module unloaded." 165 172 elif test -z "$SILENTUNLOAD"; then … … 198 205 case "$1" in 199 206 stopall) 207 STOPPING="stopping" 200 208 stop_all_modules 201 209 ;;
Note:
See TracChangeset
for help on using the changeset viewer.