-
-
Save marissa999/7a005b3c5fcae8aea20f0814ffe1af8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/openrc-run | |
name="mount-sdcard" | |
description="Automount encrypted SD Card" | |
start() { | |
/sbin/cryptsetup open /dev/mmcblk1p1 sdcard --key-file=/etc/luks-keys/disk_secret_key | |
/bin/mount /dev/mapper/sdcard /sdcard | |
} | |
stop() { | |
/bin/umount /sdcard | |
/sbin/cryptsetup close sdcard | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment