git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/aux/block-inventory
diff options
context:
space:
mode:
authorHarald Pfeiffer <harald.pfeiffer _ bechtle.com> 2019-11-25 10:04:43 +0100
committerHarald Pfeiffer <harald.pfeiffer _ bechtle.com> 2019-11-25 10:04:43 +0100
commit737cf3c79a03489a53b250cf53cf2a8f53f603a4 (patch)
treef6bd73a2c3a78e3731c413d4ebd09fc47c477139 /documentation/aux/block-inventory
parent7bde242bc4d99505955f023b4a71aa08b3a762fd (diff)
downloadrhel-scripts-737cf3c79a03489a53b250cf53cf2a8f53f603a4.tar.bz2
+documentation scripts
Diffstat (limited to 'documentation/aux/block-inventory')
-rwxr-xr-xdocumentation/aux/block-inventory10
1 files changed, 10 insertions, 0 deletions
diff --git a/documentation/aux/block-inventory b/documentation/aux/block-inventory
new file mode 100755
index 0000000..c8dc3f3
--- /dev/null
+++ b/documentation/aux/block-inventory
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+SCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+source "$SCDIR/ctrl-c"||exit 1
+ODETFIL="$SCDIR/../blockdevices"
+
+echo -n "Fetching blocks..."
+true>"$ODETFIL";[ "$?" -ne 0 ]&&echo "failed."&&exit 1||echo -n "."
+echo -n ".";lsblk -im -o+FSTYPE,MIN-IO,MOUNTPOINT 2>/dev/null|sed 's/luks-[^\ ]\+/luks-<uuid> /g' >"$ODETFIL"
+[ "$?" -ne 0 ]&&echo ".failed."||echo ".done."