From 7ccc4980147954b68829d5555fcc9e5b7dd2c4ec Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Fri, 17 Apr 2020 15:40:02 +0200 Subject: Use samba for create and restore virtual partitions This requires to configure user and password for samba repositories. --- main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index a67362d..e6cacf5 100755 --- a/main.py +++ b/main.py @@ -25,8 +25,17 @@ def main(): port = ogconfig.get_value_section('opengnsys', 'port') url = ogconfig.get_value_section('opengnsys', 'url') mode = ogconfig.get_value_section('opengnsys', 'mode') + samba_user = ogconfig.get_value_section('samba', 'user') + samba_pass = ogconfig.get_value_section('samba', 'pass') - client = ogClient(ip, int(port), mode) + samba_config = None + + if mode == 'linux': + proc = subprocess.Popen(["browser", "-qws", url]) + elif mode == 'virtual': + samba_config = {'user': samba_user, 'pass': samba_pass} + + client = ogClient(ip, int(port), mode, samba_config) client.connect() client.run() -- cgit v1.2.3-18-g5258