Previously, we would generate manpages using direct automake-style @foo@
substitution. These, however, contain data in shell syntaxis, which
results in a manpage in the style of '${prefix}/etc/nbd-server/config
allows to configure the nbd-server', which is confusing.
Instead, generate a shell script that outputs the manpage using shell
interpolation, which supposedly works correctly. It's a bit yuck, but
it's the way automake wants us to do these things.
nbd_server_CPPFLAGS=$nbd_server_CPPFLAGS" -DSYSCONFDIR='\"$sysconfdir\"'"
AC_SUBST(nbd_server_CPPFLAGS)
AC_CONFIG_HEADERS([config.h])
nbd_server_CPPFLAGS=$nbd_server_CPPFLAGS" -DSYSCONFDIR='\"$sysconfdir\"'"
AC_SUBST(nbd_server_CPPFLAGS)
AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile doc/Doxyfile man/Makefile man/nbd-client.8 man/nbd-server.5 man/nbd-server.1])
+AC_CONFIG_FILES([Makefile doc/Doxyfile man/Makefile man/nbd-client.8.sh man/nbd-server.5.sh man/nbd-server.1.sh])
man_MANS = nbd-server.1 nbd-server.5 nbd-client.8
CLEANFILES = manpage.links manpage.refs
MAINTAINERCLEANFILES = nbd-server.1 nbd-client.8 nbd-server.5
man_MANS = nbd-server.1 nbd-server.5 nbd-client.8
CLEANFILES = manpage.links manpage.refs
MAINTAINERCLEANFILES = nbd-server.1 nbd-client.8 nbd-server.5
-EXTRA_DIST = nbd-server.1.in.sgml nbd-client.8.in.sgml nbd-server.5.in.sgml
+EXTRA_DIST = nbd-server.1.in.sgml nbd-client.8.in.sgml nbd-server.5.in.sgml nbd-server.1.sh.in nbd-server.5.sh.in nbd-server.8.sh.in
-infiles: nbd-server.1.in nbd-client.8.in nbd-server.5.in
-
-nbd-server.1.in: nbd-server.1.in.sgml
+nbd-server.1: nbd-server.1.sh
+ sh nbd-server.1.sh > nbd-server.1
+nbd-server.5: nbd-server.5.sh
+ sh nbd-server.5.sh > nbd-server.5
+nbd-client.8: nbd-client.8.sh
+ sh nbd-client.8.sh > nbd-server.8
+nbd-server.1.sh.in: nbd-server.1.in.sgml sh.tmpl
LC_ALL=C docbook2man nbd-server.1.in.sgml
LC_ALL=C docbook2man nbd-server.1.in.sgml
- mv NBD-SERVER.1 nbd-server.1.in
-nbd-client.8.in: nbd-client.8.in.sgml
+ cat sh.tmpl > nbd-server.1.sh.in
+ cat NBD-SERVER.1 >> nbd-server.1.sh.in
+ echo "EOF" >> nbd-server.1.sh.in
+ rm NBD-SERVER.1
+nbd-client.8.sh.in: nbd-client.8.in.sgml sh.tmpl
LC_ALL=C docbook2man nbd-client.8.in.sgml
LC_ALL=C docbook2man nbd-client.8.in.sgml
- mv NBD-CLIENT.8 nbd-client.8.in
-nbd-server.5.in: nbd-server.5.in.sgml
+ cat sh.tmpl > nbd-client.8.sh.in
+ cat NBD-CLIENT.8 >> nbd-client.8.sh.in
+ echo "EOF" >> nbd-client.8.sh.in
+ rm NBD-CLIENT.8
+nbd-server.5.sh.in: nbd-server.5.in.sgml sh.tmpl
LC_ALL=C docbook2man nbd-server.5.in.sgml
LC_ALL=C docbook2man nbd-server.5.in.sgml
- mv NBD-SERVER.5 nbd-server.5.in
+ cat sh.tmpl > nbd-server.5.sh.in
+ cat NBD-SERVER.5 >> nbd-server.5.sh.in
+ echo "EOF" >> nbd-server.5.sh.in
+ rm NBD-SERVER.5
were a local filesystem.</para>
<para><command>&dhpackage;</command> implements some security
were a local filesystem.</para>
<para><command>&dhpackage;</command> implements some security
- through a file called "@sysconfdir@/nbd-server/allow" (by default; a
+ through a file called "$sysconfdir/nbd-server/allow" (by default; a
different file can be chosen with the '-l' option or through a
config file specification). This file must list the IP-addresses or
network masks of clients that are allowed to connect. If it does not
different file can be chosen with the '-l' option or through a
config file specification). This file must list the IP-addresses or
network masks of clients that are allowed to connect. If it does not
<listitem>
<para>Specify configuration file. The default configuration
file, if this parameter is not specified, is
<listitem>
<para>Specify configuration file. The default configuration
file, if this parameter is not specified, is
- <filename>@sysconfdir@/nbd-server/config</filename>.</para>
+ <filename>$sysconfdir/nbd-server/config</filename>.</para>
<para>Note that the configuration file is always parsed and
the entries in the file used, even if an extra server is
specified on the command line. To disable the configuration
<para>Note that the configuration file is always parsed and
the entries in the file used, even if an extra server is
specified on the command line. To disable the configuration
<!ENTITY dhemail "<email>wouter@debian.org</email>">
<!ENTITY dhusername "Wouter Verhelst">
<!ENTITY dhucpackage "<refentrytitle>NBD-SERVER</refentrytitle>">
<!ENTITY dhemail "<email>wouter@debian.org</email>">
<!ENTITY dhusername "Wouter Verhelst">
<!ENTITY dhucpackage "<refentrytitle>NBD-SERVER</refentrytitle>">
- <!ENTITY dhpackage "@sysconfdir@/nbd-server/config">
+ <!ENTITY dhpackage "$sysconfdir/nbd-server/config">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
<refsect1>
<title>DESCRIPTION</title>
<refsect1>
<title>DESCRIPTION</title>
- <para><command>&dhpackage;</command> allows to configure the
- nbd-server.</para>
+ <para>This file allows to configure the nbd-server.</para>
- <filename>@sysconfdir@/nbd-server/config</filename> is the default
+ <filename>$sysconfdir/nbd-server/config</filename> is the default
configuration file, this can be varied with the <option>-C</option>
option to <command>nbd-server</command>(1).
</para>
configuration file, this can be varied with the <option>-C</option>
option to <command>nbd-server</command>(1).
</para>
<listitem>
<para>
Optional; string; default
<listitem>
<para>
Optional; string; default
- <filename>@sysconfdir@/nbd-server/allow</filename>.
+ <filename>$sysconfdir/nbd-server/allow</filename>.
</para>
<para>
The name of the authorization file for this export. This
</para>
<para>
The name of the authorization file for this export. This
[export]
exportname = /export/blkdev
port = 12345
[export]
exportname = /export/blkdev
port = 12345
- authfile = @sysconfdir@/nbd-server/allow
+ authfile = $sysconfdir/nbd-server/allow
- <para>With @sysconfdir@/nbd-server/allow containing the following:</para>
+ <para>With $sysconfdir/nbd-server/allow containing the following:</para>
<programlisting>
127.0.0.1
192.168.0.0/8
<programlisting>
127.0.0.1
192.168.0.0/8