Lines Matching defs:hostid
160 static char hostid_file[] = "/etc/hostid";
1623 * Originally clconf_init() apparently needed the hostid. But
1625 * By placing the hostid logic here, we are able to make use of
1629 cmn_err(CE_WARN, "Unable to set hostid");
2276 * for reading the hostid from the legacy file (/kernel/misc/sysinit).
2768 * to set one based on the contents of /etc/hostid. If this file does
2769 * not exist, assume that we are to generate a new hostid and set
2774 * /etc/hostid does not exist, we will attempt to get a serial number
2782 * In an attempt to make the hostid less prone to abuse
2783 * (for license circumvention, etc), we store it in /etc/hostid
2798 * that's what we use for the host id. If your hostid falls here, you need
2831 * which ensures that the entire UUID contributes to the hostid.
2860 int32_t hostid = (int32_t)HW_INVALID_HOSTID;
2866 * If /etc/hostid file not found, we'd like to get a pseudo
2867 * random number to use at the hostid. A nice way to do this
2878 * hostid file not found - try to load sysinit module
2879 * and see if it has a nonzero hostid value...use that
2880 * instead of generating a new hostid here if so.
2884 hostid = (int32_t)atoi(hw_serial);
2892 if ((hostid == HW_INVALID_HOSTID) &&
2897 hostid = uuid_to_hostid(smsys.smbs_uuid);
2901 * Generate a "random" hostid using the clock. These
2903 * saved to a persistent /etc/hostid file.
2905 if (hostid == HW_INVALID_HOSTID) {
2908 hostid = (int32_t)tenmicrodata & 0x0CFFFFF;
2910 hostid = (int32_t)tsc & 0x0CFFFFF;
2913 /* hostid file found */
2943 "Bad value %s for hostid",
2946 hostid = (int32_t)tmp;
2960 if (hostid == HW_INVALID_HOSTID) /* didn't find a hostid */
2962 "hostid missing or corrupt");
2967 * hostid is now the value read from /etc/hostid, or the
2968 * new hostid we generated in this routine or HW_INVALID_HOSTID if not
2971 return (hostid);