Add @DBUS_VERSION@ to the generated man pages
[platform/upstream/dbus.git] / doc / dbus-uuidgen.1.xml.in
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4 <!-- lifted from troff+man by doclifter -->
5 <refentry id='dbusuuidgen1'>
6
7 <!--  dbus&bsol;-uuidgen manual page.
8  Copyright (C) 2006 Red Hat, Inc. -->
9
10 <refmeta>
11 <refentrytitle>dbus-uuidgen</refentrytitle>
12 <manvolnum>1</manvolnum>
13 <refmiscinfo class="manual">User Commands</refmiscinfo>
14 <refmiscinfo class="source">D-Bus</refmiscinfo>
15 <refmiscinfo class="version">@DBUS_VERSION@</refmiscinfo>
16 </refmeta>
17 <refnamediv>
18 <refname>dbus-uuidgen</refname>
19 <refpurpose>Utility to generate UUIDs</refpurpose>
20 </refnamediv>
21 <!-- body begins here -->
22 <refsynopsisdiv id='synopsis'>
23 <cmdsynopsis>
24   <command>dbus-uuidgen</command>    <arg choice='opt'>--version </arg>
25     <arg choice='opt'><arg choice='plain'>--ensure </arg><arg choice='opt'><replaceable>=FILENAME</replaceable></arg></arg>
26     <arg choice='opt'><arg choice='plain'>--get </arg><arg choice='opt'><replaceable>=FILENAME</replaceable></arg></arg>
27     <sbr/>
28 </cmdsynopsis>
29 </refsynopsisdiv>
30
31
32 <refsect1 id='description'><title>DESCRIPTION</title>
33 <para>The <command>dbus-uuidgen</command> command generates or reads a universally unique ID.</para>
34
35
36 <para>Note that the D-Bus UUID has no relationship to RFC 4122 and does not generate
37 UUIDs compatible with that spec. Many systems have a separate command
38 for that (often called "uuidgen").</para>
39
40
41 <para>See <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more information
42 about D-Bus.</para>
43
44
45 <para>The primary usage of <command>dbus-uuidgen</command> is to run in the post-install
46 script of a D-Bus package like this:</para>
47 <literallayout remap='.nf'>
48   dbus-uuidgen --ensure
49 </literallayout> <!-- .fi -->
50
51
52 <para>This will ensure that /var/lib/dbus/machine-id exists and has the uuid in it.
53 It won't overwrite an existing uuid, since this id should remain fixed
54 for a single machine until the next reboot at least.</para>
55
56
57 <para>The important properties of the machine UUID are that 1) it remains
58 unchanged until the next reboot and 2) it is different for any two 
59 running instances of the OS kernel. That is, if two processes see the 
60 same UUID, they should also see the same shared memory, UNIX domain
61 sockets, local X displays, localhost.localdomain resolution, process
62 IDs, and so forth.</para>
63
64
65 <para>If you run <command>dbus-uuidgen</command> with no options it just prints a new uuid made
66 up out of thin air.</para>
67
68
69 <para>If you run it with --get, it prints the machine UUID by default, or
70 the UUID in the specified file if you specify a file.</para>
71
72
73 <para>If you try to change an existing machine-id on a running system, it will
74 probably result in bad things happening. Don't try to change this file. Also,
75 don't make it the same on two different systems; it needs to be different
76 anytime there are two different kernels running.</para>
77
78
79 <para>The UUID should be different on two different virtual machines,
80 because there are two different kernels.</para>
81
82 </refsect1>
83
84 <refsect1 id='options'><title>OPTIONS</title>
85 <para>The following options are supported:</para>
86 <variablelist remap='TP'>
87   <varlistentry>
88   <term><option>--get[=FILENAME]</option></term>
89   <listitem>
90 <para>If a filename is not given, defaults to localstatedir/lib/dbus/machine-id
91 (localstatedir is usually /var). If this file exists and is valid, the
92 uuid in the file is printed on stdout. Otherwise, the command exits 
93 with a nonzero status.</para>
94
95   </listitem>
96   </varlistentry>
97   <varlistentry>
98   <term><option>--ensure[=FILENAME]</option></term>
99   <listitem>
100 <para>If a filename is not given, defaults to localstatedir/lib/dbus/machine-id
101 (localstatedir is usually /var). If this file exists then it will be
102 validated, and a failure code returned if it contains the wrong thing.
103 If the file does not exist, it will be created with a new uuid in it.
104 On success, prints no output.</para>
105
106   </listitem>
107   </varlistentry>
108   <varlistentry>
109   <term><option>--version</option></term>
110   <listitem>
111 <para>Print the version of dbus-uuidgen</para>
112
113   </listitem>
114   </varlistentry>
115 </variablelist>
116 </refsect1>
117
118 <refsect1 id='author'><title>AUTHOR</title>
119 <para>See <ulink url='http://www.freedesktop.org/software/dbus/doc/AUTHORS'>http://www.freedesktop.org/software/dbus/doc/AUTHORS</ulink></para>
120
121 </refsect1>
122
123 <refsect1 id='bugs'><title>BUGS</title>
124 <para>Please send bug reports to the D-Bus mailing list or bug tracker,
125 see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para>
126 </refsect1>
127 </refentry>
128