]> git.sesse.net Git - bcachefs-tools-debian/blob - initramfs/script
add -c to cmd_unlock, to check if a device needs to be unlocked
[bcachefs-tools-debian] / initramfs / script
1 #!/bin/sh
2
3 PREREQ=""
4
5 prereqs()
6 {
7     echo "$PREREQ"
8 }
9
10 case $1 in
11 # get pre-requisites
12 prereqs)
13     prereqs
14     exit 0
15     ;;
16 esac
17
18 # Check if it needs unlocking:
19 if bcachefs unlock -c $ROOT >/dev/null 2>&1; then
20     echo "Unlocking $ROOT:"
21
22     while true; do
23         bcachefs unlock $ROOT && break
24     done
25 fi