Re: Installation opsi Server
Verfasst: 22 Feb 2023, 12:43
Tag, habe ich noch nicht. Habe ich ich auch bisher nicht gefunden. Liegt die in einem Ordner im /etc - Verzeichnis?
Code: Alles auswählen
if $myIPName$ = "auto"
set $myIPName$ = "%opsiserviceUser%"
if $myIPName$ = ""
Message "opsiserviceUser does not exist, getting FQDN from system"
set $hostnamelist$ = shellCall("hostname")
for %s% in $hostnamelist$ do set $hostname$ = "%s%"
if contains($hostname$,".")
set $myIPName$ = $hostname$
else
if contains($distroName$, "openSUSE")
set $domainlist$ = shellCall("hostname -d")
else
set $domainlist$ = shellCall("dnsdomainname")
endif
for %s% in $domainlist$ do set $domain$ = "%s%"
if $domain$ = ""
comment "dnsdomainname command was not successfull, trying alternatives"
if fileExists("/run/systemd/netif/leases/2")
set $domainlist$ = shellCall("cat /run/systemd/netif/leases/2 | grep 'DOMAINNAME' | awk -F= '{ print $2 }'")
else
if fileExists("/var/lib/dhcp/dhclient.leases")
set $domainlist$ = shellCall("cat /var/lib/dhcp/dhclient.leases | grep 'domain-name ' | awk '{ print $3 }' | tr -d ';' | head -1")
endif
endif
Code: Alles auswählen
IP FQDN HOSTNAME