summarylogtreecommitdiffstats
path: root/hook.dm-partprobe
blob: 80fba900c87f2fa6b4eb8bbd7e6cb62fc9ead4be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/ash

run_hook() {
    DEVICES=$(ls /dev/dm-*)

    for device in ${DEVICES}; do
        if [ "$(file -Ls ${device} | awk {' print $2 '})" == "DOS/MBR" ]; then
            echo "Probing device ${device}..."
            partprobe ${device}
        else
            echo "Device ${device} isn't a device with partitions table, ignoring"
        fi
    done
}

# vim: set ft=sh ts=4 sw=4 et: