.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DH_INSTALLNSS 1" .TH DH_INSTALLNSS 1 "2022-11-01" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" dh_installnss \- enable NSS services .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdh_installnss\fR [\fIdebhelperĀ options\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBdh_installnss\fR is a debhelper program that is responsible for injecting \&\s-1NSS\s0 (Name Service Switch) services into \fI/etc/nsswitch.conf\fR. .SH "FILES" .IX Header "FILES" .IP "debian/\fIpackage\fR.nss" 4 .IX Item "debian/package.nss" Lists the services to inject into \fI/etc/nsswitch.conf\fR when a package is configured and to remove when a package is removed or purged. .Sp Each line in that file (a \fIdirective\fR) should be of the form .Sp \&\fIdb\fR \fIposition\fR \fIservice\fR \fIaction\fR \fIcondition\fR .Sp where the fields contain the following pieces of information: .RS 4 .IP "\fIdb\fR" 4 .IX Item "db" The \s-1NSS\s0 database in which the service will be added. Usually \f(CW\*(C`hosts\*(C'\fR. .IP "\fIposition\fR" 4 .IX Item "position" Where to add the \s-1NSS\s0 service. .Sp Possible values are \f(CW\*(C`first\*(C'\fR, \f(CW\*(C`last\*(C'\fR, \f(CW\*(C`before=\f(CIservice\f(CW\*(C'\fR, \&\f(CW\*(C`after=\f(CIservice\f(CW\*(C'\fR, plus the pseudo-positions \f(CW\*(C`remove\-only\*(C'\fR, \&\f(CW\*(C`database\-add\*(C'\fR and \f(CW\*(C`database\-require\*(C'\fR. .Sp The pseudo-position \f(CW\*(C`remove\-only\*(C'\fR is used to mark services that are not going to be added during the installation of the package, but that will be removed during its deinstallation (e.g., legacy services). .Sp The pseudo-position \f(CW\*(C`database\-add\*(C'\fR is used to request the addition of a non-standard \s-1NSS\s0 database to \fI/etc/nsswitch.conf\fR during the installation of the package and its removal during the deinstallation of the package. When \f(CW\*(C`database\-add\*(C'\fR is used, all other fields in the directive should be left empty. .Sp The pseudo-position \f(CW\*(C`database\-require\*(C'\fR is used to announce that one or more services in the \fInss\fR file will be installed under a non-standard \s-1NSS\s0 database added by another package. When \f(CW\*(C`database\-require\*(C'\fR is used, all other fields in the directive should be left empty. .IP "\fIservice\fR" 4 .IX Item "service" The name of the \s-1NSS\s0 service to add. .IP "\fIaction\fR" 4 .IX Item "action" Optional action specification \f(CW\*(C`[STATE=ACTION]\*(C'\fR. .IP "\fIcondition\fR" 4 .IX Item "condition" Optional set of conditions to better define when a service should (or should not) be installed. .Sp Only one kind of condition is currently defined: \&\f(CW\*(C`skip\-if\-present=\f(CIservice,service,...\f(CW\*(C'\fR. .RE .RS 4 .Sp Additionally, text between a \f(CW\*(C`#\*(C'\fR character and the end of line is ignored. .RE .SH "EXAMPLES" .IX Header "EXAMPLES" An example \fIdebian/nss\fR file could look like this: .PP .Vb 3 \& hosts before=dns mdns4 \& hosts before=mdns4 mdns4_minimal [NOTFOUND=return] \& hosts remove\-only mdns # In case the user manually added it .Ve .PP After the installation of this package, the original configuration of the \fBhosts\fR database in \fB/etc/nsswitch.conf\fR will change from: .PP .Vb 1 \& hosts: files dns .Ve .PP to: .PP .Vb 1 \& hosts: files mdns4_minimal [NOTFOUND=return] mdns4 dns .Ve .SH "CAVEATS" .IX Header "CAVEATS" .SS "Non-standard \s-1NSS\s0 databases" .IX Subsection "Non-standard NSS databases" Directives in a \fI\fIpackage\fI.nss\fR file can reference a non-standard \&\s-1NSS\s0 database only if that database has been first declared with a \&\f(CW\*(C`database\-add\*(C'\fR or \f(CW\*(C`database\-require\*(C'\fR directive in the same file. .PP Non-standard \s-1NSS\s0 databases are all databases that are not defined in \&\fI/etc/nsswitch.conf\fR as shipped by the package \fBbase-files\fR. .PP If a directive references an undeclared non-standard \s-1NSS\s0 database (e.g., \f(CW\*(C`somedb\*(C'\fR), \fBdh_installnss\fR will exit with the error message \&\f(CW\*(C`Unknown NSS database \*(Aqsomedb\*(Aq\*(C'\fR. .PP A non-standard \s-1NSS\s0 database can be declared by at most one installed package. In other words, if the directives in the \fBnss\fR files of two packages A and B reference the same non-standard \s-1NSS\s0 database \f(CW\*(C`somedb\*(C'\fR and both packages can be installed at the same time, one of the following two solutions must be implemented: .IP "1." 4 Package A supplies the \f(CW\*(C`somedb database\-add\*(C'\fR directive, package B \&\fIPre-Depend\fRs on A and uses a \f(CW\*(C`somedb database\-require\*(C'\fR directive. .IP "2." 4 The shared package C supplies the \f(CW\*(C`somedb database\-add\*(C'\fR directive, both package A and B \fIPre-Depend\fR on C and use a \&\f(CW\*(C`somedb database\-require\*(C'\fR directive. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdebhelper\fR\|(7) .PP This program is a debhelper addon. .SH "AUTHOR" .IX Header "AUTHOR" Gioele Barabucci