Lines Matching +full:uuid +full:- +full:dev

45 	uuid=$1
46 # Generate hostid based on hostuuid - take first four bytes from md5(uuid).
47 id=`echo -n $uuid | /sbin/md5`
52 startmsg "Setting hostuuid: ${uuid}."
53 ${SYSCTL} kern.hostuuid="${uuid}" >/dev/null
55 ${SYSCTL} kern.hostid=${id} >/dev/null
60 uuid=$1
62 x="[0-9a-f]"
66 # accepting the UUID.
67 case "${uuid}" in
68 00000000-0000-0000-0000-000000000000)
70 00020003-0004-0005-0006-000700080009)
72 03000200-0400-0500-0006-000700080009)
74 07090201-0103-0301-0807-060504030201)
76 11111111-1111-1111-1111-111111111111)
78 11111111-2222-3333-4444-555555555555)
80 12345678-1234-5678-90ab-cddeefaabbcc)
82 4c4c4544-0000-2010-8020-80c04f202020)
84 58585858-5858-5858-5858-585858585858)
86 890e2d14-cacd-45d1-ae66-bc80e8bfeb0f)
88 8e275844-178f-44a8-aceb-a7d7e5178c63)
90 dc698397-fa54-4cf2-82c8-b1b5307a6a7f)
92 fefefefe-fefe-fefe-fefe-fefefefefefe)
94 *-ffff-ffff-ffff-ffffffffffff)
96 $y$y-$y-$y-$y-$y$y$y)
106 uuid=`kenv -q smbios.system.uuid`
108 if valid_hostid $uuid; then
109 echo "${uuid}"
110 elif [ "$uuid" ]; then
117 # First look for UUID in hardware.
118 uuid=`hostid_hardware`
121 if [ "${uuid}" = "INVALID" ]; then
122 warn "hostid: unable to figure out a UUID from DMI data, generating a new one"
124 uuid=""
127 # Generate a random UUID if invalid or not found
128 if [ -z "${uuid}" ]; then
129 # If not found, fall back to software-generated UUID.
130 uuid=`uuidgen ${hostid_uuidgen_flags}`
132 hostid_set $uuid
138 # Store newly generated UUID in ${hostid_file}.
139 echo $uuid > ${hostid_file}
140 if [ $? -ne 0 ]; then
147 # If ${hostid_file} already exists, we take UUID from there.
148 if [ -r ${hostid_file} ]; then
156 # No hostid file, generate UUID.