1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-24 07:49:42 +02:00

work in progress

This commit is contained in:
dbarzin 2022-06-11 20:06:30 +02:00
parent e5c781ad47
commit 7134251bb3
3 changed files with 100 additions and 18 deletions

View file

@ -11,7 +11,7 @@ monitor.filter_by('block')
autoMount=False
def printInfo(dev):
def printDeviceInfo(dev):
print('')
print('<BLOCK INFORMATION>')
print('Device name: %s' % dev.get('DEVNAME'))
@ -33,7 +33,7 @@ for device in iter(monitor.poll, None):
if 'ID_FS_TYPE' in device:
if device.action == 'add':
if device.device_node[5:7] == 'sd' and device.get('DEVTYPE')=='partition':
#printInfo(device)
printDeviceInfo(device)
print("New device {}".format(device.device_node))
# loop until device is mounted
if autoMount: