Red Hat Bugzilla – Bug 548834
uname -i started returning unknown
Last modified: 2017-05-03 11:35:06 EDT
Description of problem:
I am running rawhide with f12 kernels (due to f13 kernels not booting) and recently uname -i started returning unknown instead of i386 which broke some scripts I was using.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Thanks for report, this was caused by my drop of one hacky patch for uname which never got upstream. It seems that I have to put at least parts of that patch back - but I'll check if there is some other way... sorry for troubles...
Looking into http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=193170 it seems there is no easy way to get the correct results other way - no <sys/systeminfo.h> header... I'll put the sysinfo patch back - except the part for athlon, which is really hacky and unreliable.
Fixed in coreutils-8.2-4.fc13. Closing RAWHIDE.
I am confirming that it is working again for me.
Thanks for fixing this quickly!
I believe the correct solution is to use 'uname -m' instead of 'uname -i' in your scripts. The -p/-i options of uname are now documented as non-portable:
I am about to drop the downstream patch again to make uname work as documented: print "unknown" if the information is not available
Note that Gentoo Linux uses the following patch to get the info from /proc: