[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: distro name
- From: Enrique Perez-Terron <enrio online no>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: distro name
- Date: Tue, 03 Aug 2004 07:23:25 +0200
On Tue, 2004-08-03 at 00:53, Jim C. wrote:
> > rpm -q --queryformat "%{DISTRIBUTION}\n" glibc
>
> Actually this is not what I had in mind. I dno't want to query the rpm
> database. I want to query the system during an rpm install, i.e. in the
> spec file: "If this is the correct version of Linux, install otherwise
> fail."
The closest thing I know of is "rpm -qa \*-release", but I don't know if
that works for anything not redhat-related.
$ rpm -qa \*-release
fedora-release-2-4
$ cat /etc/fedora-release
Fedora Core release 2 (Tettnang)
$ ls -l /etc/redhat-release
lrwxrwxrwx 1 root root 14 May 29 18:49 /etc/redhat-release -> fedora-release
$ cat /etc/issue
Fedora Core release 2 (Tettnang)
Kernel \r on an \m
Perhaps /etc/issue is more generic? getty outputs this file with
uname -x replacing \x.
Regards,
Enrique
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]