Lines Matching defs:hostid

161 static char hostid_file[] = "/etc/hostid";
1733 * Originally clconf_init() apparently needed the hostid. But
1735 * By placing the hostid logic here, we are able to make use of
1739 cmn_err(CE_WARN, "Unable to set hostid");
2382 * for reading the hostid from the legacy file (/kernel/misc/sysinit).
2874 * to set one based on the contents of /etc/hostid. If this file does
2875 * not exist, assume that we are to generate a new hostid and set
2880 * /etc/hostid does not exist, we will attempt to get a serial number
2888 * In an attempt to make the hostid less prone to abuse
2889 * (for license circumvention, etc), we store it in /etc/hostid
2904 * that's what we use for the host id. If your hostid falls here, you need
2937 * which ensures that the entire UUID contributes to the hostid.
2966 int32_t hostid = (int32_t)HW_INVALID_HOSTID;
2972 * If /etc/hostid file not found, we'd like to get a pseudo
2973 * random number to use at the hostid. A nice way to do this
2984 * hostid file not found - try to load sysinit module
2985 * and see if it has a nonzero hostid value...use that
2986 * instead of generating a new hostid here if so.
2990 hostid = (int32_t)atoi(hw_serial);
2998 if ((hostid == HW_INVALID_HOSTID) &&
3003 hostid = uuid_to_hostid(smsys.smbs_uuid);
3007 * Generate a "random" hostid using the clock. These
3009 * saved to a persistent /etc/hostid file.
3011 if (hostid == HW_INVALID_HOSTID) {
3014 hostid = (int32_t)tenmicrodata & 0x0CFFFFF;
3016 hostid = (int32_t)tsc & 0x0CFFFFF;
3019 /* hostid file found */
3049 "Bad value %s for hostid",
3052 hostid = (int32_t)tmp;
3066 if (hostid == HW_INVALID_HOSTID) /* didn't find a hostid */
3068 "hostid missing or corrupt");
3073 * hostid is now the value read from /etc/hostid, or the
3074 * new hostid we generated in this routine or HW_INVALID_HOSTID if not
3077 return (hostid);