summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-02-13 01:58:09 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-13 14:39:44 -0800
commit38ae1720be39b62a4f199aa5be4ac85948bc23f0 (patch)
tree9c9fcc02e421517f981a43d68c0942b0a758518f /xlators
parentf0831feae02a0c248b674c9cf9e9cc282e0e4854 (diff)
syncdaemon: Create conf directory if not preset
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/marker/utils/syncdaemon/gsyncd.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py
index f8200dd58..f9022df3a 100644
--- a/xlators/features/marker/utils/syncdaemon/gsyncd.py
+++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py
@@ -210,6 +210,15 @@ def main_i():
peers, canon_peers = pa
if not 'config_file' in rconf:
rconf['config_file'] = os.path.join(os.path.dirname(sys.argv[0]), "conf/gsyncd.conf")
+ confp = os.path.dirname(sys.argv[0]) + "conf/"
+ try:
+ st = os.lstat (confp)
+ except OSError:
+ ex = sys.exc_info()[1]
+ if ex.errno == ENOENT:
+ os.mkdir(confp)
+ else:
+ raise
gcnf = GConffile(rconf['config_file'], canon_peers)
confdata = rconf.get('config')