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