]> gitweb.morketsmerke.org Git - immudex.git/commitdiff
Różnica w reprezentacji czasu modyfikacji miedzy Debian testing a stable i oldstable
authorxf0r3m <jakubstasinski@protonmail.com>
Sat, 6 Jan 2024 12:52:16 +0000 (13:52 +0100)
committerxf0r3m <jakubstasinski@protonmail.com>
Sat, 6 Jan 2024 12:52:16 +0000 (13:52 +0100)
tools/sbin/immudex-crypt

index a9f0ac2f48e1abec3c91c65cfc1a5b8bea4814f5..91ffd80cfaef85c36b0e695acf42d179249451f0 100755 (executable)
@@ -72,7 +72,10 @@ function open() {
     fi
     cryptsetup open $1 immudex-crypt${index};
     mkdir -p /media/${USER}/immudex-crypt${index};
-    dmDevice=$(ls -l /dev/mapper/immudex-crypt${index} | awk '{printf $10}' | cut -d "/" -f 2);
+    # Różnica w reprezentacji czasu modyfikacji miedzy Debian testing a stable i oldstable 
+    #dmDevice=$(ls -l /dev/mapper/immudex-crypt${index} | awk '{printf $10}' | cut -d "/" -f 2);
+    lastField=$(ls -l /dev/mapper/immudex-crypt${index} | grep -o ' ' | wc -l);
+    dmDevice=$(ls -al /dev/mapper/immudex-crypt0 | cut -d " " -f ${lastField}- | cut -d "/" -f2);
     if ! $(sudo file -s /dev/${dmDevice} | grep -q 'ext4'); then
       echo "Could not determine filesystem of unlocked device.";
       echo -n "Format this device to ext4? (y/n): "