Add hostname to defaults if possible
This commit is contained in:
6
main.go
6
main.go
@ -31,8 +31,12 @@ type IP struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
test, err := os.Hostname()
|
||||
if err == nil {
|
||||
host = test
|
||||
}
|
||||
flag.StringVar(&configFile, "c", "/etc/sssd/sssd.conf", "Path to SSSD Config.")
|
||||
flag.StringVar(&host, "h", host, "Host ID for DNS (relativeDomainName)")
|
||||
flag.StringVar(&host, "h", "", "Host ID for DNS (relativeDomainName)")
|
||||
flag.StringVar(&domain, "d", "", "Domain for DNS (zoneName)")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user