The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/man/man8/zgenhostid.8

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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 https://opensource.org/licenses/CDDL-1.0.
   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 .\" Copyright (c) 2017 by Lawrence Livermore National Security, LLC.
   22 .\"
   23 .Dd May 26, 2021
   24 .Dt ZGENHOSTID 8
   25 .Os
   26 .
   27 .Sh NAME
   28 .Nm zgenhostid
   29 .Nd generate host ID into /etc/hostid
   30 .Sh SYNOPSIS
   31 .Nm
   32 .Op Fl f
   33 .Op Fl o Ar filename
   34 .Op Ar hostid
   35 .
   36 .Sh DESCRIPTION
   37 Creates
   38 .Pa /etc/hostid
   39 file and stores the host ID in it.
   40 If
   41 .Ar hostid
   42 was provided, validate and store that value.
   43 Otherwise, randomly generate an ID.
   44 .
   45 .Sh OPTIONS
   46 .Bl -tag -width "-o filename"
   47 .It Fl h
   48 Display a summary of the command-line options.
   49 .It Fl f
   50 Allow output overwrite.
   51 .It Fl o Ar filename
   52 Write to
   53 .Pa filename
   54 instead of the default
   55 .Pa /etc/hostid .
   56 .It Ar hostid
   57 Specifies the value to be placed in
   58 .Pa /etc/hostid .
   59 It should be a number with a value between 1 and 2^32-1.
   60 If
   61 .Sy 0 ,
   62 generate a random ID.
   63 This value
   64 .Em must
   65 be unique among your systems.
   66 It
   67 .Em must
   68 be an 8-digit-long hexadecimal number, optionally prefixed by
   69 .Qq 0x .
   70 .El
   71 .
   72 .Sh FILES
   73 .Pa /etc/hostid
   74 .
   75 .Sh EXAMPLES
   76 .Bl -tag -width Bd
   77 .It Generate a random hostid and store it
   78 .Dl # Nm
   79 .It Record the libc-generated hostid in Pa /etc/hostid
   80 .Dl # Nm Qq $ Ns Pq Nm hostid
   81 .It Record a custom hostid Po Ar 0xdeadbeef Pc in Pa /etc/hostid
   82 .Dl # Nm Ar deadbeef
   83 .It Record a custom hostid Po Ar 0x01234567 Pc in Pa /tmp/hostid No and overwrite the file if it exists
   84 .Dl # Nm Fl f o Ar /tmp/hostid 0x01234567
   85 .El
   86 .
   87 .Sh SEE ALSO
   88 .Xr genhostid 1 ,
   89 .Xr hostid 1 ,
   90 .Xr sethostid 3 ,
   91 .Xr spl 4
   92 .
   93 .Sh HISTORY
   94 .Nm
   95 emulates the
   96 .Xr genhostid 1
   97 utility and is provided for use on systems which
   98 do not include the utility or do not provide the
   99 .Xr sethostid 3
  100 function.

Cache object: 00875fa5c3dcb62572de5b8285908555


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.