summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Greg Hudson <ghudson@mit.edu>1999-06-01 15:00:43 +0000
committerGravatar Greg Hudson <ghudson@mit.edu>1999-06-01 15:00:43 +0000
commit69b1ec66ce66e45037c4db3db95ede366c44efd0 (patch)
tree041b0b7980d9360e2cd6a41906c02545259e62ca
parent5de3e446a885ed74c2221339be37d2d2170b205f (diff)
Don't lose if we can't canonicalize the hostname. Just warn.
-rw-r--r--clients/zctl/zctl.c12
1 files changed, 6 insertions, 6 deletions
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");