Hello Ram,<br><br><br>Sorry I was away from networking for a while so could not check.<br><br><br>I ran vboxconfig.sh replicas modified by your and by my patches, instrumented to print out major/minor versions after get_sysinfo and abort. Results differ:<br><br><br>OI_151a8 : both detected as 11 / 151<br><br>PKGFMRI=pkg://openindiana.org/system/kernel@0.5.11,5.11-0.151.1.8:20130721T133142Z<br><br><br>OmniOS Bloody 151015: mine detected as 11 / 151, yours detected as 11 / 151015 (which will be greater than 159 in a later test)<br><br>PKGFMRI=pkg://omnios/system/kernel@0.5.11,5.11-0.151015:20150714T040209Z<br><br><br>OI Hipster: mine detected as 11 / 151, yours detected as 11 / 0<br><br>PKGFMRI=pkg://openindiana.org/system/kernel@0.5.11-2015.0.1.15147:20150721T130056Z<br><br><br>SXCE snv_117 (svr4): mine detected as 11 / 117 (interim HOST_OS_MAJORVERSION=SXCE), yours detected as a strange Solaris 11 without pkg(5) and aborted... VirtualBox does run there (at least an older version, and IIRC without both of the advanced modules) ;-)<br><br><br>Jim<br>----- Исходное сообщение -----<br>От: Ramshankar <ramshankar.venkataraman@oracle.com><br>Дата: Tuesday, July 7, 2015 16:25<br>Тема: Re: [vbox-dev] Patch to support installation on non-Sun/Oracle Solaris hosts<br>Кому (To): jim@cos.ru<br>Копия (Cc): vbox-dev@virtualbox.org<br><br>> Hi Jim,<br>> <br>> On 07/ 7/15 02:45 PM, Jim Klimov wrote:<br>> > Hello Ram,<br>> ><br>> > Makes sense, and that's why I started with touch-files <br>> following an<br>> > established example so as to support anything regardless of <br>> matching,> only an admin (or wrap-package) who'd touch the file <br>> is needed. ;)<br>> <br>> Adding a touch file is okay. I have no objections to having that <br>> option in.<br>> <br>> > I think a "case" would be more readable and conservative on <br>> resources> than a stack of if-elif-else-fi (don't have to call <br>> an external program<br>> > too many times) and would suffice especially since you are comparing<br>> > fixed strings or, at most, simple wildcards here.<br>> <br>> Yes, I'm aware of this but as of now, I'd rather have everything <br>> working <br>> than<br>> fork-avoidance optimizations.  This can come at a later step.<br>> <br>> > In the patch itself, here's a bit that worries me: either I've <br>> had a<br>> > night too sleepless, or there is a logical error here:<br>> ><br>> > <br>> +                    STR_KERN_MAJOR=`echo "$PKGFMRI" | sed<br>> > 's/^.*\@//;s/\,.*//;s/\-.*//'`<br>> > <br>> +                    if test "$STR_KERN_MAJOR" = "5.12"; then<br>> > + ###(comments snipped)<br>> > <br>> +                        BRANCH_VERSION=$STR_KERN_MAJOR<br>> > <br>> +                        HOST_OS_MAJORVERSION=`echo "$BRANCH_VERSION" |<br>> > cut -f2 -d'-' | cut -f1,2 -d'.'`<br>> > <br>> +                        if test "$HOST_OS_MAJORVERSION" = "5.12"; then<br>> > <br>> +                            HOST_OS_MAJORVERSION="12"<br>> > <br>> +                            HOST_OS_MINORVERSION=`echo<br>> > "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f6 -d'.'`<br>> > <br>> +                            return 0<br>> > <br>> +                        else<br>> > <br>> +                            errorprint "Failed to parse the Solaris<br>> > kernel major version."<br>> > <br>> +                            exit 1<br>> ><br>> > Here you have STR_KERN_MAJOR=="5.12" (fixed, no more, no <br>> less), then<br>> > assign BRANCH_VERSION to the same "5.12" and try to `cut` <br>> major/minor> versions out of it. You do get "5.12" again as <br>> major, but minor without<br>> > the dash-separated part of the FMRI is meaningless (and ends <br>> up empty).<br>> <br>> Oops, my mistake. Thanks. I've attached a new patch of that part <br>> of the code<br>> which I think should address the problem.<br>> <br>> > Otherwise, cutting the "5.11", "0.5.11" or "5.12" parts seems <br>> to work<br>> > correctly here.<br>> ><br>> > Also, in line 10 (added comment for OI Hipster string) there <br>> is "of"<br>> > instead of "or" ;)<br>> <br>> Also fixed in the patch I've attached.<br>> <br>> Let me know how this works for the OS/distros in question here.<br>> <br>> Regards,<br>> Ram.<br>> <br>