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 <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
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))