diff options
Diffstat (limited to 'cmount.py')
| -rwxr-xr-x | cmount.py | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -20,6 +20,12 @@ def main(): | |||
| 20 | config_dict = json.load(fp) | 20 | config_dict = json.load(fp) |
| 21 | cstm_error = 'Invalid / nonexistent mapping: {0}'.format(sys.argv[1]) | 21 | cstm_error = 'Invalid / nonexistent mapping: {0}'.format(sys.argv[1]) |
| 22 | data = config_dict[sys.argv[1]] | 22 | data = config_dict[sys.argv[1]] |
| 23 | if data.get('type') == 'efile': | ||
| 24 | cstm_error = 'Unable to create loop device' | ||
| 25 | data['device'] = subprocess.check_output(['/usr/sbin/losetup', | ||
| 26 | '--find', | ||
| 27 | '--show', | ||
| 28 | data['device']]).strip() | ||
| 23 | cstm_error = 'system() error' | 29 | cstm_error = 'system() error' |
| 24 | subprocess.check_call(['/sbin/cryptsetup', | 30 | subprocess.check_call(['/sbin/cryptsetup', |
| 25 | 'luksOpen', | 31 | 'luksOpen', |
