]>
Commit | Line | Data |
---|---|---|
b9373170 OF |
1 | .\" |
2 | .\" CDDL HEADER START | |
3 | .\" | |
4 | .\" The contents of this file are subject to the terms of the | |
5 | .\" Common Development and Distribution License (the "License"). | |
6 | .\" You may not use this file except in compliance with the License. | |
7 | .\" | |
8 | .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | |
9 | .\" or http://www.opensolaris.org/os/licensing. | |
10 | .\" See the License for the specific language governing permissions | |
11 | .\" and limitations under the License. | |
12 | .\" | |
13 | .\" When distributing Covered Code, include this CDDL HEADER in each | |
14 | .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. | |
15 | .\" If applicable, add the following below this CDDL HEADER, with the | |
16 | .\" fields enclosed by brackets "[]" replaced with your own identifying | |
17 | .\" information: Portions Copyright [yyyy] [name of copyright owner] | |
18 | .\" | |
19 | .\" CDDL HEADER END | |
20 | .\" | |
21 | .\" | |
22 | .\" Copyright (c) 2017 by Lawrence Livermore National Security, LLC. | |
23 | .\" | |
24 | .Dd July 24, 2017 | |
25 | .Dt ZGENHOSTID 8 SMM | |
26 | .Os Linux | |
27 | .Sh NAME | |
28 | .Nm zgenhostid | |
29 | .Nd generate and store a hostid in | |
30 | .Em /etc/hostid | |
31 | .Sh SYNOPSIS | |
32 | .Nm | |
33 | .Op Ar hostid | |
34 | .Sh DESCRIPTION | |
35 | If | |
36 | .Em /etc/hostid | |
37 | does not exist, create it and store a hostid in it. If the user provides | |
38 | .Op Ar hostid | |
39 | on the command line, store that value. Otherwise, randomly generate a | |
40 | value to store. | |
41 | .Pp | |
42 | This emulates the | |
43 | .Xr genhostid 1 | |
44 | utility and is provided for use on systems which do not include the utility. | |
b9373170 OF |
45 | .Sh OPTIONS |
46 | .Op Ar hostid | |
47 | Specifies the value to be placed in | |
48 | .Em /etc/hostid . | |
49 | It must be a number with a value between 1 and 2^32-1. This value | |
50 | .Sy must | |
51 | be unique among your systems. It must be expressed in hexadecimal and be | |
52 | exactly 8 digits long. | |
53 | .Sh EXAMPLES | |
54 | .Bl -tag -width Ds | |
55 | .It Generate a random hostid and store it | |
56 | .Bd -literal | |
57 | # zgenhostid | |
58 | .Ed | |
59 | .It Record the libc-generated hostid in Em /etc/hostid | |
60 | .Bd -literal | |
61 | # zgenhostid $(hostid) | |
62 | .Ed | |
63 | .It Record a custom hostid (0xdeadbeef) in Em etc/hostid | |
64 | .Bd -literal | |
65 | # zgenhostid deadbeef | |
66 | .Ed | |
67 | .El | |
68 | .Sh SEE ALSO | |
b9373170 | 69 | .Xr genhostid 1 , |
90cdf283 | 70 | .Xr hostid 1 , |
71 | .Xr spl-module-parameters 5 |