post.sh 384 B

12345678910111213141516171819
  1. #!/bin/sh
  2. read QUERY_STRING
  3. eval $(echo "$QUERY_STRING" | awk -F'&' '{for(i=1; i <= NF; i++) { print $i }}')
  4. echo -n $(httpd -d $passphrase) > /lib/cryptsetup/passfifo
  5. for i in $(seq 10); do
  6. sleep 1
  7. if [ -f /dev/mapper/root ]; then
  8. cat ../index.html | sed '/TPL:UNLOCKED/d'
  9. exit 0
  10. fi
  11. done
  12. cat ../index.html | sed 's/caticorn/&_failed/' | sed '/TPL:ERROR/d'
  13. exit 0