Added to the repository. These are almost straight copies of the previous hook scripts except they are now Debian-specific. They also each log their start and finish and optional information via the use of the ../common.sh file. No major changes anticipated.
46 lines
646 B
Bash
Executable File
46 lines
646 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# This script installs OpenSSH upon the new system. It must make sure
|
|
# that the server is not running before it exits - otherwise the temporary
|
|
# mounted directory will not be unmountable.
|
|
#
|
|
# Steve
|
|
# --
|
|
# http://www.steve.org.uk/
|
|
|
|
|
|
prefix=$1
|
|
|
|
|
|
#
|
|
# Source our common functions
|
|
#
|
|
if [ -e ../common.sh ]; then
|
|
. ../common.sh
|
|
fi
|
|
|
|
|
|
#
|
|
# Log our start
|
|
#
|
|
logMessage Script $0 starting
|
|
|
|
|
|
#
|
|
# Install ssh
|
|
#
|
|
installDebianPackage ${prefix} ssh
|
|
|
|
|
|
#
|
|
# Make sure sshd isn't running, this will cause our unmounting of the
|
|
# disk image to fail..
|
|
#
|
|
chroot ${prefix} /etc/init.d/ssh stop
|
|
|
|
|
|
#
|
|
# Log our finish
|
|
#
|
|
logMessage Script $0 finished
|