- Timestamp:
- Oct 21, 2008 2:09:01 PM (16 years ago)
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/preremove.sh
r13231 r13446 23 23 currentzone=`zonename` 24 24 if test "$currentzone" = "global"; then 25 # stop and unregister webservice SMF 26 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice:default 27 /usr/sbin/svccfg delete svc:/application/virtualbox/webservice:default 25 # stop and unregister webservice SMF (if present) 26 webservicefound=`svcs -a | grep "virtualbox/webservice"` 27 if test ! -z "$webservicefound"; then 28 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice:default 29 /usr/sbin/svccfg delete svc:/application/virtualbox/webservice:default 30 fi 28 31 29 32 # stop and unregister zoneaccess SMF (if present) -
trunk/src/VBox/Installer/solaris/vboxdrv.sh
r13354 r13446 21 21 SILENTUNLOAD="" 22 22 MODNAME="vboxdrv" 23 VBIMODNAME="vbi" 23 24 FLTMODNAME="vboxflt" 24 25 MODDIR32="/platform/i86pc/kernel/drv" … … 73 74 module_loaded() 74 75 { 75 if test -f "/etc/name_to_major"; then 76 loadentry=`cat /etc/name_to_major | grep $MODNAME` 77 else 78 loadentry=`/usr/sbin/modinfo | grep $MODNAME` 79 fi 76 # modinfo should now work properly since we prevent module autounloading 77 loadentry=`/usr/sbin/modinfo | grep $MODNAME` 80 78 if test -z "$loadentry"; then 81 79 return 1 … … 86 84 vboxflt_module_loaded() 87 85 { 88 if test -f "/etc/name_to_major"; then 89 loadentry=`cat /etc/name_to_major | grep $FLTMODNAME` 90 else 91 loadentry=`/usr/sbin/modinfo | grep $FLTMODNAME` 92 fi 86 # modinfo should now work properly since we prevent module autounloading 87 loadentry=`/usr/sbin/modinfo | grep $FLTMODNAME` 93 88 if test -z "$loadentry"; then 94 89 return 1 … … 137 132 { 138 133 if module_loaded; then 139 /usr/sbin/rem_drv $MODNAME || abort "Failed to unload VirtualBox Host kernel module. Old one still active!" 140 info "VirtualBox Host kernel module unloaded." 134 vboxdrv_mod_id=`/usr/sbin/modinfo | grep $MODNAME | cut -f 1 -d ' ' ` 135 if test -n "$vboxdrv_mod_id"; then 136 /usr/sbin/modunload -i $vboxdrv_mod_id 137 rc=$? 138 if test "$rc" -eq 0; then 139 /usr/sbin/rem_drv $MODNAME || abort "Unloaded VirtualBox Host kernel module, but failed to remove it." 140 info "VirtualBox Host kernel module unloaded." 141 else 142 abort "Failed to unload VirtualBox Host kernel module. Old one still active!!" 143 fi 144 fi 141 145 elif test -z "$SILENTUNLOAD"; then 142 146 info "VirtualBox Host kernel module not loaded." … … 144 148 145 149 # check for vbi and force unload it 146 vbi_mod_id=`/usr/sbin/modinfo | grep vbi| cut -f 1 -d ' ' `150 vbi_mod_id=`/usr/sbin/modinfo | grep $VBIMODNAME | cut -f 1 -d ' ' ` 147 151 if test -n "$vbi_mod_id"; then 148 /usr/sbin/modunload -i $vbi_mod_id > /dev/null 2>&1 || abort "Failed to unload VirtualBox kernel interfaces module. Old one still active!"152 /usr/sbin/modunload -i $vbi_mod_id 149 153 fi 150 154 } … … 155 159 info "VirtualBox NetFilter kernel module already loaded." 156 160 else 157 /usr/sbin/add_drv -m'* 0600 root sys' $FLTMODNAME || abort "Failed to load VirtualBox NetFilter Kernel module."161 /usr/sbin/add_drv -m'* 0600 root sys' $FLTMODNAME || abort "Failed to add VirtualBox NetFilter Kernel module." 158 162 /usr/sbin/modload -p drv/$FLTMODNAME 159 163 if test ! vboxflt_module_loaded; then
Note:
See TracChangeset
for help on using the changeset viewer.