VirtualBox

Changeset 13446 in vbox for trunk/src


Ignore:
Timestamp:
Oct 21, 2008 2:09:01 PM (16 years ago)
Author:
vboxsync
Message:

Solaris/Installer: fixes.

Location:
trunk/src/VBox/Installer/solaris
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/solaris/preremove.sh

    r13231 r13446  
    2323currentzone=`zonename`
    2424if 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
    2831
    2932    # stop and unregister zoneaccess SMF (if present)
  • trunk/src/VBox/Installer/solaris/vboxdrv.sh

    r13354 r13446  
    2121SILENTUNLOAD=""
    2222MODNAME="vboxdrv"
     23VBIMODNAME="vbi"
    2324FLTMODNAME="vboxflt"
    2425MODDIR32="/platform/i86pc/kernel/drv"
     
    7374module_loaded()
    7475{
    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`
    8078    if test -z "$loadentry"; then
    8179        return 1
     
    8684vboxflt_module_loaded()
    8785{
    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`
    9388    if test -z "$loadentry"; then
    9489        return 1
     
    137132{
    138133    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
    141145    elif test -z "$SILENTUNLOAD"; then
    142146        info "VirtualBox Host kernel module not loaded."
     
    144148
    145149    # 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 ' ' `
    147151    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
    149153    fi
    150154}
     
    155159        info "VirtualBox NetFilter kernel module already loaded."
    156160    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."
    158162        /usr/sbin/modload -p drv/$FLTMODNAME
    159163        if test ! vboxflt_module_loaded; then
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette