First sync.

This commit is contained in:
BrainwreckedTech
2019-08-21 17:28:17 -04:00
parent d8848f1108
commit 4a818bb2d5
12 changed files with 505 additions and 1 deletions

10
ddi Executable file
View File

@@ -0,0 +1,10 @@
# DDI - Dump Disk Information
#
# Dumps the UUID and label of a filesystem to its / (root) directory.
# Parses df output to find current mounts and then uses lsblk to get info.
for dev in `df -h | grep ^/dev | cut -d\ -f1 | cut -d/ -f3`; do
loc=`cat /proc/mounts | grep $dev | cut -d\ -f2`
lsblk -fn -o UUID /dev/$dev > $loc/.uuid
lsblk -fn -o LABEL /dev/$dev > $loc/.label
done