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