Fix date of creation in manual page
Document /etc/os-release usage of lsb_release
This commit is contained in:
parent
79c35831cc
commit
6257c99f32
10
help2man
10
help2man
|
@ -173,7 +173,7 @@ my ($help_text, $version_text) = map {
|
|||
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
|
||||
} qw(help), $opt_version_key;
|
||||
|
||||
my $date = strftime "%B %Y", localtime;
|
||||
my $date = strftime "%B %Y", gmtime((stat "lsb_release")[9]);
|
||||
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||
my $package = $program;
|
||||
my $version;
|
||||
|
@ -326,12 +326,6 @@ while (length)
|
|||
next;
|
||||
}
|
||||
|
||||
# Catch bug report text.
|
||||
if (/^(Report +bugs|Email +bug +reports +to) /)
|
||||
{
|
||||
$sect = 'REPORTING BUGS';
|
||||
}
|
||||
|
||||
# Author section.
|
||||
elsif (/^Written +by/)
|
||||
{
|
||||
|
@ -479,7 +473,7 @@ EOT
|
|||
|
||||
# Section ordering.
|
||||
my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS FILES EXAMPLES);
|
||||
my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO');
|
||||
my @post = ('AUTHOR', 'COPYRIGHT', 'SEE ALSO');
|
||||
my $filter = join '|', @pre, @post;
|
||||
|
||||
# Output content.
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
[FILES]
|
||||
|
||||
If the installation is LSB compliant, the \fB"/etc/lsb-release"\fR
|
||||
file should contain the \fBLSB_VERSION\fR field.
|
||||
file should contain the \fBLSB_VERSION\fR field.
|
||||
The value of the field should be a colon separated list of
|
||||
supported module versions indicating the LSB specification
|
||||
supported module versions indicating the LSB specification
|
||||
modules to which the installation is compliant. If the installation is not
|
||||
compliant, the above field should
|
||||
compliant, the above field should
|
||||
.B not
|
||||
be present.
|
||||
|
||||
Optional fields are \fBDISTRIB_ID\fR, \fBDISTRIB_RELEASE\fR,
|
||||
\fBDISTRIB_CODENAME\fR, \fBDISTRIB_DESCRIPTION\fR and can be used to
|
||||
override information which is parsed from the
|
||||
\fB"/etc/\fIdistrib\fB-release"\fR file.
|
||||
override information which is parsed from the
|
||||
\fB"/etc/os-release"\fR file. Since \fB"/etc/os-release"\fR is the new
|
||||
standard, there is no need anymore to add any of the optional
|
||||
fields to \fB"/etc/lsb-release"\fR.
|
||||
|
||||
If the \fB"/etc/lsb-release.d"\fR directory exists, it is
|
||||
searched for filenames which are taken as additional module-version
|
||||
strings to add to \fBLSB_VERSION\fR.
|
||||
|
||||
The \fB"/etc/\fIdistrib\fB-release"\fR file contains a description line
|
||||
which is parsed to get information (especially on currently non-LSB
|
||||
compliant systems).
|
||||
|
||||
The required line style is:
|
||||
.br
|
||||
.br
|
||||
"\fIDistributor\fR \fBrelease\fR \fIx.x\fR \fB(\fR\fICodename\fR\fB)\fR"
|
||||
|
||||
Where \fIDistributor\fR can be a couple of words, but then concatenated
|
||||
|
@ -32,13 +30,6 @@ Where \fIDistributor\fR can be a couple of words, but then concatenated
|
|||
\fIx.x\fR starts with a digit followed by any non-blank characters,
|
||||
\fICodename\fR will also be concatenated (blanks cleanup only).
|
||||
|
||||
\fBrelease\fR may not be used as a keyword in \fBDISTRIB_DESCRIPTION\fR
|
||||
if you don't want to override \fB"/etc/\fIdistrib\fB-release"\fR data.
|
||||
|
||||
\fBNotice:\fR To support the \fBDebian\fR distributions' lack of
|
||||
information (see "/etc/debian_version" file) some have been directly
|
||||
added into the \fBlsb_release\fR script.
|
||||
|
||||
[EXAMPLES]
|
||||
If the "\fB/etc/lsb-release\fR" file contains:
|
||||
|
||||
|
@ -50,9 +41,18 @@ and the "\fB/etc/lsb-release.d\fR" directory contains:
|
|||
|
||||
graphics-2.0-ia64 graphics-2.0-noarch
|
||||
|
||||
and the "\fB/etc/foobar-release\fP" file contains:
|
||||
and the "\fB/etc/os-release\fP" file contains:
|
||||
|
||||
NAME="SLES"
|
||||
.br
|
||||
VERSION="12-SP2"
|
||||
.br
|
||||
VERSION_ID="12.2"
|
||||
.br
|
||||
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2"
|
||||
.br
|
||||
ID="sles"
|
||||
|
||||
My Linux Distrib release 1.0RC4 (TryIt)
|
||||
|
||||
Then the results of various options will be:
|
||||
|
||||
|
@ -60,17 +60,17 @@ Then the results of various options will be:
|
|||
.br
|
||||
LSB Version: core-2.0-ia64:core-2.0-noarch:graphics-2.0-ia64:graphics-2.0-noarch
|
||||
.br
|
||||
Distributor ID: MyDistrib
|
||||
Distributor ID: SUSE
|
||||
.br
|
||||
Description: I enjoy using my distrib
|
||||
.br
|
||||
Release: 1.0RC4
|
||||
Release: 12.2
|
||||
.br
|
||||
Codename: TryIt
|
||||
Codename: n/a
|
||||
|
||||
.B $ ./lsb_release -a -s
|
||||
.br
|
||||
1.0 MyDistrib "I enjoy using my distrib" 1.0RC4 TryIt
|
||||
1.0 SUSE "I enjoy using my distrib" 12.2 n/a
|
||||
|
||||
If the "/etc/lsb-release" file is absent (indicating this is
|
||||
not an LSB compliant distribution), the result will be:
|
||||
|
@ -79,15 +79,10 @@ not an LSB compliant distribution), the result will be:
|
|||
.br
|
||||
LSB Version: n/a
|
||||
.br
|
||||
Distributor ID: MyDistrib
|
||||
Distributor ID: SUSE
|
||||
.br
|
||||
Description: My Linux Distrib release 1.0RC4 (TryIt)
|
||||
Description: SUSE Linux Enterprise Server 12 SP2
|
||||
.br
|
||||
Release: 1.0RC4
|
||||
Release: 12.2
|
||||
.br
|
||||
Codename: TryIt
|
||||
|
||||
[REPORTING BUGS]
|
||||
Report bugs at http://bugs.linuxbase.org.
|
||||
Please include a complete, self contained example that will allow the
|
||||
bug to be reproduced, and say which version of lsb_release you are using.
|
||||
Codename: n/a
|
||||
|
|
Loading…
Reference in New Issue