import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
import {
  execAsync,
  init_execAsync
} from "./chunk-XALGXSKB.js";
import {
  diag,
  init_esm
} from "./chunk-LRULMAAA.js";
import {
  __esm
} from "./chunk-5H446C7X.js";

// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js
import { promises as fs } from "fs";
async function getMachineId() {
  try {
    const result = await fs.readFile("/etc/hostid", { encoding: "utf8" });
    return result.trim();
  } catch (e) {
    diag.debug(`error reading machine id: ${e}`);
  }
  try {
    const result = await execAsync("kenv -q smbios.system.uuid");
    return result.stdout.trim();
  } catch (e) {
    diag.debug(`error reading machine id: ${e}`);
  }
  return void 0;
}
var init_getMachineId_bsd = __esm({
  "../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js"() {
    init_execAsync();
    init_esm();
  }
});
init_getMachineId_bsd();
export {
  getMachineId
};
//# sourceMappingURL=getMachineId-bsd-HSK5LZMG.js.map