diff options
author | uvok cheetah | 2024-09-09 20:36:26 +0200 |
---|---|---|
committer | uvok cheetah | 2024-09-09 20:36:26 +0200 |
commit | e642c89888f23088f2388dcd44a75e088564215f (patch) | |
tree | 04bec080464ea958983940308ab84c3ac705c3f1 /custom/overlay/etc |
Initial commit
Diffstat (limited to 'custom/overlay/etc')
-rwxr-xr-x | custom/overlay/etc/init.d/S49-dropbear-prep | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/custom/overlay/etc/init.d/S49-dropbear-prep b/custom/overlay/etc/init.d/S49-dropbear-prep new file mode 100755 index 0000000..33bad8f --- /dev/null +++ b/custom/overlay/etc/init.d/S49-dropbear-prep @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Prepares dropbear (external keys). +# Assumes there's a third partition (test for it). +# Assume partition is formatted (however you want). +# +# TODO: +# Actually create the dropbear symlink if keys already +# exist in /data/dropbear/ +# + + +start() { + if ! [[ -e /data/ ]] ; then + mkdir /data/ + fi + + if test -e /dev/mmcblk0p3 && ! grep -sq mmcblk0p3 /proc/mounts ; then + mount /dev/mmcblk0p3 /data/ + fi +} + +case "$1" in + start) + start + ;; + stop|restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit 0 |