#!/bin/sh

SPLASH=''

for opt in $(cat /proc/cmdline); do
  case $opt in
    splash*)
      SPLASH='true'
      ;;
  esac
done

if [ -n "$SPLASH" ]; then
  if [ -p /dev/.initramfs/usplash_outfifo ]; then
    usplash_write "INPUTQUIET Enter password: "
    PASS="$(cat /dev/.initramfs/usplash_outfifo)"
    /bin/echo -n $PASS
    exit 0
  fi
fi

read -s -p 'Enter passphrase: ' PASS
/bin/echo -n $PASS

