This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/fstab: static file system information. | |
# | |
# Use 'blkid' to print the universally unique identifier for a | |
# device; this may be used with UUID= as a more robust way to name devices | |
# that works even if disks are added and removed. See fstab(5). | |
# | |
# <file system> <mount point> <type> <options> <dump> <pass> | |
# / was on /dev/sda2 during installation | |
UUID=d539b457-cd66-454c-9e0c-114a1c0982cd / ext4 errors=remount-ro 0 1 | |
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai | |
import dbus | |
import re | |
bus = dbus.SystemBus() | |
devs = bus.get_object('org.freedesktop.UDisks2', | |
'/org/freedesktop/UDisks2/block_devices') | |
xml = devs.Introspect(dbus_interface='org.freedesktop.DBus.Introspectable') | |
for dev in re.finditer(r'name=[\'"](.+?)[\'"]', type(u'')(xml)): | |
bd = bus.get_object('org.freedesktop.UDisks2', |