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.6.21^2~47 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a534c4ac5e2a2872b8579237cb16ae11d778b9f2;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. Reviewed-on: http://gerrit.openafs.org/11684 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk (cherry picked from commit 381c7afbe60a0e6d53e8cc1bca2de920574b3383) Change-Id: I6b93e337fd56294107f527af20d99f97689c1701 Reviewed-on: https://gerrit.openafs.org/12522 Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand --- diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index b596c6a5a..c403dc460 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -199,11 +199,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))