From 9c52bb19f2aa6bf53a21e0fe47929d1b8e159ac9 Mon Sep 17 00:00:00 2001 From: archikid02 Date: Sun, 1 Feb 2026 16:54:49 +0000 Subject: [PATCH] mountcrypt --- usr/bin/mountcrypt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 usr/bin/mountcrypt diff --git a/usr/bin/mountcrypt b/usr/bin/mountcrypt new file mode 100644 index 0000000..a154b2f --- /dev/null +++ b/usr/bin/mountcrypt @@ -0,0 +1,15 @@ +#!/usr/bin/bash + +NAME+=$(dmesg | tail | grep -o sd[a-z] | tail -1) +NAME+=1 +DEV=/dev/${NAME} +MNT_PT=/mnt/$NAME +BLOCK=crypt_${NAME} + +echo "mount dev: $DEV at $MNT_PT" +cryptsetup luksOpen $DEV $BLOCK +mkdir $MNT_PT +mount $/dev/mapper/$BLOCK $MNT_PT +cd $MNT_PT + +exit 0