1
0
mirror of synced 2026-01-22 18:21:20 +00:00
xen-tools.xen-tools/hooks/common/70-install-ssh-rpm
Axel Beckert 2e9394d010 Refactoring: Massive code deduplication in hooks directory (Part 2)
All hooks files which were identical in two groups (debianoid and
redhatoid) have been moved to the new hooks/common directory and now
have symbolic links to the according new files at their old locations.
2012-06-04 16:47:59 +02:00

43 lines
594 B
Bash
Executable File

#!/bin/sh
#
# This script installs OpenSSH upon the new system.
#
# Steve
# --
# http://www.steve.org.uk/
prefix=$1
#
# Source our common functions
#
if [ -e /usr/lib/xen-tools/common.sh ]; then
. /usr/lib/xen-tools/common.sh
else
. ./hooks/common.sh
fi
#
# Log our start
#
logMessage Script $0 starting
#
# Install the OpenSSH server.
#
if [ ! -d ${prefix}/proc ]; then
mkdir -p ${prefix}/proc
fi
mount -o bind /proc ${prefix}/proc
chroot ${prefix} /usr/bin/yum -y install openssh-server passwd
umount ${prefix}/proc
#
# Log our finish
#
logMessage Script $0 finished