You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
290 B

#!/bin/sh
. /lib/dracut-lib.sh
dev=$1
luks=$2
if [ -f /etc/crypttab ]; then
while read l rest; do
strstr "${l##luks-}" "${luks##luks-}" && exit 0
done < /etc/crypttab
fi
echo "$luks $dev" >> /etc/crypttab
systemctl daemon-reload
systemctl start cryptsetup.target
exit 0