From 381c7afbe60a0e6d53e8cc1bca2de920574b3383 Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Wed, 21 Jan 2015 14:58:35 -0500 Subject: [PATCH 1/1] bozo: do not exit when the client config already exists The bosserver creates symlinks for the client CSDB and ThisCell config files during initialization. Avoid exiting if the client CSDB or ThisCell configuration already exists, otherwise the bosserver cannot be restarted with bos restart. This fixes an error introduced with commit 720363fa9bf7cfbebdc485104b74ca6bac1895f6, Fix unchecked return values. Change-Id: Ie6ecf126d1ed663f161c26da2a8c4d568369d99d Reviewed-on: http://gerrit.openafs.org/11684 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk --- src/bozo/bosserver.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index ca85c22..fa56807 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -283,11 +283,17 @@ CreateDirs(const char *coredir) return errno; if (symlink(AFSDIR_SERVER_THISCELL_FILEPATH, - AFSDIR_CLIENT_THISCELL_FILEPATH)) - return errno; + AFSDIR_CLIENT_THISCELL_FILEPATH)) { + if (errno != EEXIST) { + return errno; + } + } if (symlink(AFSDIR_SERVER_CELLSERVDB_FILEPATH, - AFSDIR_CLIENT_CELLSERVDB_FILEPATH)) - return errno; + AFSDIR_CLIENT_CELLSERVDB_FILEPATH)) { + if (errno != EEXIST) { + return errno; + } + } #endif /* AFS_NT40_ENV */ if (coredir) { if (MakeDir(coredir)) -- 1.9.4