]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
bozo: do not exit when the client config already exists
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 21 Jan 2015 19:58:35 +0000 (14:58 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 2 Mar 2017 09:38:25 +0000 (04:38 -0500)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 381c7afbe60a0e6d53e8cc1bca2de920574b3383)

Change-Id: I6b93e337fd56294107f527af20d99f97689c1701
Reviewed-on: https://gerrit.openafs.org/12522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/bozo/bosserver.c

index b596c6a5a5db14dae4415467a75db750b3e644f2..c403dc4603e0bafa2445f8ef8b6259e0a2226a42 100644 (file)
@@ -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))