Merge branch 'vendor/DHCPCD'
[dragonfly.git] / initrd / etc / rcmount_crypt
1 #!/bin/sh
2
3 FSTYPE=$2
4 MOUNTFROM="/dev/${3#/dev/}"
5 VOLUME=$4
6 OPTIONS=$5
7
8 cryptsetup isLuks $MOUNTFROM || return 1
9 cryptsetup $OPTIONS luksOpen $MOUNTFROM $VOLUME || return 2
10 mount -o ro -t $FSTYPE /dev/mapper/$VOLUME $NEW_ROOT || return 3