#!/bin/sh case $1 in ""|load) for ak_file in authorized_keys known_hosts id_dsa id_rsa id_ed25519; do modreg file authorized-keys $ak_file "$ak_file" 0 $ak_file done modreg daemon --hide authorized-keys echo -n "Setting up SSH authorized_keys for root ... " dir="/tmp/flash/authorized_keys_root" mkdir -p $dir [ ! -e ~root/.ssh ] && ln -s $dir ~root/.ssh echo "done." ;; unload) modunreg file authorized-keys modunreg daemon authorized-keys ;; start) ;; stop) ;; restart) ;; status) ;; *) echo "Usage: $0 [load|unload|start|stop|restart|status]" 1>&2 exit 1 ;; esac exit 0