Project

General

Profile

Actions

Bug #2647

closed

sudo pkgrm SUNWvbox - pkgrm: ERROR: preremove script did not complete successfully

Added by Richard PALO about 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-04-20
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

another problem on prestable2

wanted to upgrade to vbox 4.1.12
but:

~$ sudo pkgrm SUNWvbox

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Mot de passe : 

The following package is currently installed:
   SUNWvbox  Oracle VM VirtualBox
             (i386) 4.1.8,REV=2011.12.19.14.10.75467

Do you want to remove this package? [y,n,?,q] y

## Removing installed package instance <SUNWvbox>

This package contains scripts which will be executed with super-user
permission during the process of removing this package.

Do you want to continue with the removal of this package [y,n,?,q] y
## Verifying package <SUNWvbox> dependencies in global zone
## Processing package information.
## Executing preremove script.
Removing VirtualBox services and drivers...
## Failed to detect the Solaris kernel version.
## Failed.
pkgrm: ERROR: preremove script did not complete successfully

Removal of <SUNWvbox> failed.

seems to be failing within /var/sadm/pkg/SUNWvbox/install/preremove

currentzone=`zonename`
if test "$currentzone" = "global"; then
    echo "Removing VirtualBox services and drivers..." 
    ${PKG_INSTALL_ROOT:=/}/opt/VirtualBox/vboxconfig.sh --preremove
    if test "$?" -eq 0; then
        echo "Done." 
        exit 0
    fi
    echo 1>&2 "## Failed." 
    exit 1
fi

in /opt/VirtualBox/vboxconfig.sh

# get_sysinfo
# cannot fail
get_sysinfo()
{
    BIN_PKG=`which pkg 2> /dev/null`
    if test -x "$BIN_PKG"; then
        PKGFMRI=`$BIN_PKG $BASEDIR_PKGOPT contents -H -t set -a name=pkg.fmri -o pkg.fmri pkg:/system/kernel 2> /dev/null`
        if test ! -z "$PKGFMRI"; then
            # The format is "pkg://solaris/system/kernel@0.5.11,5.11-0.161:20110315T070332Z" 
            #            or "pkg://solaris/system/kernel@0.5.11,5.11-0.175.0.0.0.1.0:20111012T032837Z" 
            STR_KERN=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\:.*//;s/.*,//'`
            if test ! -z "$STR_KERN"; then
                # The format is "5.11-0.161" or "5.11-0.175.0.0.0.1.0" 
                HOST_OS_MAJORVERSION=`echo "$STR_KERN" | cut -f1 -d'-'`
                HOST_OS_MINORVERSION=`echo "$STR_KERN" | cut -f2 -d'-' | cut -f2 -d '.'`
            else
                errorprint "Failed to parse the Solaris kernel version." 
                exit 1
            fi        
        else
            errorprint "Failed to detect the Solaris kernel version." 
            exit 1
        fi
    else

Actions

Also available in: Atom PDF