Support /etc/gns3/gns3_server.conf for the config

It's better for a server deployment
This commit is contained in:
Julien Duponchelle 2016-02-25 15:07:55 +01:00
parent e91e3525c4
commit 04b02171bb
No known key found for this signature in database
GPG Key ID: F1E2485547D4595D

View File

@ -75,7 +75,7 @@ class Config(object):
# 2: $HOME/.config/GNS3.conf # 2: $HOME/.config/GNS3.conf
# 3: /etc/xdg/GNS3/gns3_server.conf # 3: /etc/xdg/GNS3/gns3_server.conf
# 4: /etc/xdg/GNS3.conf # 4: /etc/xdg/GNS3.conf
# 5: server.conf in the current working directory # 5: gns3_server.conf in the current working directory
appname = "GNS3" appname = "GNS3"
home = os.path.expanduser("~") home = os.path.expanduser("~")
@ -84,6 +84,7 @@ class Config(object):
self._files = [os.path.join(os.getcwd(), filename), self._files = [os.path.join(os.getcwd(), filename),
os.path.join(home, ".config", appname, filename), os.path.join(home, ".config", appname, filename),
os.path.join(home, ".config", appname + ".conf"), os.path.join(home, ".config", appname + ".conf"),
os.path.join("/etc/gns3", filename),
os.path.join("/etc/xdg", appname, filename), os.path.join("/etc/xdg", appname, filename),
os.path.join("/etc/xdg", appname + ".conf")] os.path.join("/etc/xdg", appname + ".conf")]