How can I tell the specific Linux distribution the installer is being executed in, at runtime?

asked 01 Sep '11, 14:17

ridruejo's gravatar image

ridruejo ♦♦
57238
accept rate: 27%


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}
link

answered 01 Sep '11, 14:20

ridruejo's gravatar image

ridruejo ♦♦
57238
accept rate: 27%

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

link

answered 10 Apr '12, 08:58

sandy2012's gravatar image

sandy2012
1
accept rate: 0%

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>
link

answered 10 Apr '12, 09:47

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×73
×41
×6

Asked: 01 Sep '11, 14:17

Seen: 2,049 times

Last updated: 10 Apr '12, 09:47