Issue #16506 has been updated by Alex Harvey.

Further to this if you would like to fix it another way the outputs you 
requested are -

PA-RISC:

<pre>
# uname -a
HP-UX myhost B.11.11 U 9000/800 142444656 unlimited-user license
# uname -m
9000/800
# man uname
...
           -m             Display the machine hardware and model names.  See
                          WARNINGS.
</pre>

Itanium:

<pre>
# uname -a
HP-UX myhost B.11.31 U ia64 4208345547 unlimited-user license
# uname -m
ia64
#
</pre>

In warnings -

<pre>
 WARNINGS
      It is recommended that the model command or the getconf command be
      used to obtain the model name, since future model names may not be
      compatible with uname.  See model(1) and getconf(1).
</pre>

However (1) I don't believe HP will ever implement a future version of Unix at 
this stage where they break uname -m (2) getting information from model or 
getconf is not quite as simple as it sounds.

<pre>
# model
9000/800/L3000-5x
</pre>

or

<pre>
# model
ia64 hp server rx2660
#
</pre>

Getconf is even harder because we'd need to parse codes and lookup a fixed 
table of values.  There's a page somewhere at Symantec's website somewhere 
showing what they did or were thinking of doing in Altiris.  Summary is, I 
think uname -m is fine and much easier.

Note that on linux -

<pre>
[root@myhost ~]# uname -p
x86_64
[root@myhost ~]# uname -m
x86_64
</pre>

and on Solaris -

<pre>
-bash-3.2$ uname -p
sparc
-bash-3.2$ uname -m
sun4v
</pre>

and on AIX - 

<pre>
myhost[/]# uname -m
00CEDB964C00
myhost[/]# uname -p
powerpc
myhost[/]# man uname
...
       -m
            Displays the machine ID number of the hardware running the system. 
Note: The -m flag cannot be used to generate a unique machine identifier for 
partitions
            in an LPAR environment.
...
       -p
            Displays the architecture of the system processor.
</pre>

I think the solution is as good as we'll get and certainly fine for HP-UX users.

Note also that -p is not a part of the POSIX standard - but seems like just 
about every Unix implemented one except for HP-UX.  Typical. :)
----------------------------------------
Bug #16506: -p option invalid passed to uname in 'hardwareisa' fact on HP-UX
https://projects.puppetlabs.com/issues/16506#change-73624

Author: Alex Harvey
Status: Accepted
Priority: Normal
Assignee: Alex Harvey
Category: hpux
Target version: 1.6.x
Keywords: 
Branch: 
Affected Facter version: 


The following code does not work on HP-UX -

    Facter.add(:hardwareisa) do
      setcode 'uname -p'
    end

And the following results -

    $ facter hardwareisa
    /usr/bin/uname: illegal option -- p
    usage: uname [-amnrsvil] [-S nodename]

This affects all versions of HP-UX.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to