* Renamed get_mounted_data to get_mounted_volumes * Report data is now a dict for better clarity * Widened report hoping that LVM names will fit (they probably wont) * This fixes #38
38 lines
888 B
Python
Executable file
38 lines
888 B
Python
Executable file
#!/bin/python3
|
|
#
|
|
## Wizard Kit: Volume mount tool
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Init
|
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
sys.path.append(os.getcwd())
|
|
from functions.data import *
|
|
init_global_vars()
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
# Prep
|
|
clear_screen()
|
|
print_standard('{}: Volume mount tool'.format(KIT_NAME_FULL))
|
|
|
|
# Mount volumes
|
|
report = mount_all_volumes()
|
|
|
|
# Print report
|
|
print_info('\nResults')
|
|
for vol_name, vol_data in sorted(report.items()):
|
|
show_data(indent=4, width=20, **vol_data['show_data'])
|
|
|
|
# Done
|
|
print_standard('\nDone.')
|
|
if 'gui' in sys.argv:
|
|
pause("Press Enter to exit...")
|
|
popen_program(['nohup', 'thunar', '/media'], pipe=True)
|
|
exit_script()
|
|
except SystemExit:
|
|
pass
|
|
except:
|
|
major_exception()
|
|
|