2
0
mirror of https://github.com/mbusb/multibootusb synced 2024-11-01 15:40:16 +00:00
This commit is contained in:
mbusb 2017-02-01 22:06:52 +05:30
commit ba596fa2e2
3 changed files with 3 additions and 3 deletions

0
multibootusb-pkexec Normal file → Executable file
View File

View File

@ -33,7 +33,7 @@ def dd_linux():
output = "of=" + config.imager_usb_disk output = "of=" + config.imager_usb_disk
os.system("umount " + config.imager_usb_disk + "1") os.system("umount " + config.imager_usb_disk + "1")
command = ['dd', input, output, "bs=1M"] command = ['dd', input, output, "bs=1M"]
log("Executing ==> " + command) log("Executing ==> " + " ".join(command))
dd_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False) dd_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
pbar = progressbar.ProgressBar(maxval=100).start() # bar = progressbar.ProgressBar(redirect_stdout=True) pbar = progressbar.ProgressBar(maxval=100).start() # bar = progressbar.ProgressBar(redirect_stdout=True)
while dd_process.poll() is None: while dd_process.poll() is None:

View File

@ -102,7 +102,7 @@ def list(partition=1, fixed=None):
ID_FS_USAGE="filesystem", ID_TYPE="disk", ID_FS_USAGE="filesystem", ID_TYPE="disk",
ID_BUS="usb"): ID_BUS="usb"):
# if device['ID_BUS'] == "usb" and device['DEVTYPE'] == "partition": # if device['ID_BUS'] == "usb" and device['DEVTYPE'] == "partition":
if device['ID_BUS'] in ("usb", "scsi") and device['DEVTYPE'] == "partition": if device.get('ID_BUS') in ("usb", "scsi") and device.get('DEVTYPE') == "partition":
# gen.log(device['DEVNAME']) # gen.log(device['DEVNAME'])
devices.append(str(device['DEVNAME'])) devices.append(str(device['DEVNAME']))
else: else:
@ -205,7 +205,7 @@ def details_udev(usb_disk_part):
vendor = 'No_Vendor' vendor = 'No_Vendor'
model = 'No_Model' model = 'No_Model'
label = 'No_Label' label = 'No_Label'
elif device['ID_BUS'] in ("usb", "scsi") and device['DEVTYPE'] == "partition": elif device.get('ID_BUS') in ("usb", "scsi") and device.get('DEVTYPE') == "partition":
if (device['DEVNAME']) == usb_disk_part: if (device['DEVNAME']) == usb_disk_part:
uuid = str(device['ID_FS_UUID']) uuid = str(device['ID_FS_UUID'])
file_system = str(device['ID_FS_TYPE']) file_system = str(device['ID_FS_TYPE'])