diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-04-17 15:40:02 +0200 |
---|---|---|
committer | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-04-17 15:50:35 +0200 |
commit | 7ccc4980147954b68829d5555fcc9e5b7dd2c4ec (patch) | |
tree | 1cf06afe9ba92ab85386002f44f6fb1f971ab584 /main.py | |
parent | dfb69e9dd5f983bc2f97302866fcf37f2ef5d064 (diff) |
Use samba for create and restore virtual partitions
This requires to configure user and password for samba repositories.
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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() |