SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/bash
  2.  
  3. run_hook() {
  4.   modprobe -a -q dm-crypt >/dev/null 2>&1
  5.   modprobe loop
  6.   [ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
  7.   while [ ! -L '/dev/disk/by-id/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-part2' ]; do
  8.     echo 'Waiting for USB'
  9.     sleep 1
  10.   done
  11.  
  12.   cryptsetup open /dev/disk/by-id/XXXXXXXXXXXXXXXXXXXXXXXX-part2 cryptboot
  13.   mkdir -p /mnt
  14.   mount /dev/mapper/cryptboot /mnt
  15.   cd /mnt
  16.   cryptsetup open key.img lukskey
  17.   cryptsetup --header header.img --key-file=/dev/mapper/lukskey --keyfile-offset=N --keyfile-size=8192 open /dev/disk/by-id/YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY enc
  18.   cd /
  19.   cryptsetup close lukskey
  20.   umount /mnt
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top