From: Michael Meffie Date: Wed, 21 Jan 2015 19:58:35 +0000 (-0500) Subject: bozo: do not exit when the client config already exists X-Git-Tag: upstream/1.8.0_pre1^2~371 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=381c7afbe60a0e6d53e8cc1bca2de920574b3383;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index ca85c229e..fa568076e 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))