Skip to content

Commit

Permalink
use python agent library
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Aug 11, 2023
1 parent 49377b3 commit f0b88d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imageroot/actions/get-defaults/50read
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import sys
import json
import socket
import agent

request = json.load(sys.stdin)

Expand All @@ -34,7 +34,7 @@ response = {
if 'domain' in request and len(request['domain']) > 0:
response['domain'] = request['domain']
else:
fqdn = socket.gethostname().lower()
fqdn = agent.get_hostname().lower()
if '.' in fqdn:
# strip first domain segment
response['domain'] = fqdn[fqdn.find('.')+1:]
Expand Down

0 comments on commit f0b88d3

Please sign in to comment.