From 69b1ec66ce66e45037c4db3db95ede366c44efd0 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 1 Jun 1999 15:00:43 +0000 Subject: Don't lose if we can't canonicalize the hostname. Just warn. --- clients/zctl/zctl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'clients') diff --git a/clients/zctl/zctl.c b/clients/zctl/zctl.c index 5a756a7..8e59c79 100644 --- a/clients/zctl/zctl.c +++ b/clients/zctl/zctl.c @@ -105,13 +105,13 @@ main(argc,argv) #endif if (!(hent = gethostbyname(ourhost))) { - fprintf(stderr,"%s: Can't get canonical name for host %s", - argv[0], ourhost); - exit (1); - } + fprintf(stderr,"%s: Can't resolve hostname %s; %s may be " + "wrong in subscriptions",argv[0],ourhost, + TOKEN_CANONNAME); + strncpy(ourhostcanon,ourhost,sizeof(ourhostcanon)-1); + } else + strncpy(ourhostcanon,hent->h_name,sizeof(ourhostcanon)-1); - (void) strcpy(ourhostcanon,hent->h_name); - sci_idx = ss_create_invocation("zctl","",0,&zctl_cmds,&code); if (code) { ss_perror(sci_idx,code,"while creating invocation"); -- cgit v1.2.3