[systemd-devel] Add ARCH parameter to /etc/os-release

Greg KH gregkh at linuxfoundation.org
Mon Apr 8 11:28:54 PDT 2013


On Mon, Apr 08, 2013 at 09:59:50PM +0400, Askar Safin wrote:
> > I wonder if it wouldn't be a better idea to somehow provide a sane API
> > for this functionality rather than defining a configuration file format
> > for it?
> I think there should be some plain text file with arch. Because this
> gives us chance to determine arch of some foreign system even if we
> cannot chroot to it. Thus, we can gather information about other
> systems installed on this computer, about systems presented in loop
> devices etc.

The problem is, as numerous people are pointing out, this is a
non-trivial thing to determine, and lots of times, there is no "correct"
value at all.

So no matter what you pick, it could be wrong, so don't pick anything
and just go with the hints that the filesystem and kernel provide you
already today, if you really need to try to determine this type of thing
(hint, I don't think it's as useful as you think...)

greg k-h


More information about the systemd-devel mailing list