#!/bin/sh ## live-config(7) - System Configuration Scripts ## Copyright (C) 2006-2011 Daniel Baumann ## ## live-config comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it ## under certain conditions; see COPYING for details. Openssh_server () { # Checking if package is installed or already configured if [ ! -e /var/lib/dpkg/info/openssh-server.list ] || \ [ -e /var/lib/live/config/openssh-server ] then return fi echo -n " openssh-server" Configure_openssh_server } Configure_openssh_server () { if [ ! -e /etc/ssh/ssh_host_rsa_key ] then ssh-keygen -q -f /etc/ssh/ssh_host_rsa_key -N "" -t rsa _SSH="true" fi if [ ! -e /etc/ssh/ssh_host_dsa_key ] then ssh-keygen -q -f /etc/ssh/ssh_host_dsa_key -N "" -t dsa _SSH="true" fi if [ "${_SSH}" = "true" ] then # Creating state file touch /var/lib/live/config/openssh-server fi } Openssh_server