Comments

3 comments

  • Avatar
    ridruejo

    InstallBuilder has built-in support for Linux distribution detection, the following variables are automatically created:

    ${linux_distribution}
    ${linux_distribution_fullname}
    ${linux_distribution_shortname}
    ${linux_distribution_id}
    ${linux_distribution_codename}
    ${linux_distribution_release}
    ${linux_distribution_description}
    
  • Avatar
    sandy2012

    Do we have something similar on Solaris? To identify if the target machine is Solarisx86 or Sparc? Or is it Solaris10 or Solaris 11?

  • Avatar
    juanjo

    It is possible to check if it is solaris-intel or solaris-sparc using the <platformTest> rule:

    <showInfo text="This is solaris intel!" >
           <ruleList>
            <platformTest>
                <type>solaris-intel</type>
            </platformTest>
        </ruleList>
    </showInfo>
    

    Regarding the version, according to this link, you can get it from the /etc/release file:

    <readFile>
        <name>version_info</name>
        <path>/etc/release</path>
    </readFile>
    <setInstallerVariableFromRegEx>
        <name>solaris_version</name>
        <pattern>^\s*Solaris\s+([^\s]+)\s+.*</pattern>
        <substitution>\1</substitution>
        <text>${version_info}</text>
    </setInstallerVariableFromRegEx>
    

Please sign in to leave a comment.