1
0
mirror of synced 2026-01-11 23:42:56 +00:00
xen-tools.xen-tools/hooks/common/70-install-ssh-rpm

43 lines
591 B
Bash
Executable File

#!/bin/sh
#
# This script installs OpenSSH upon the new system.
#
# Steve
# --
# https://steve.fi/
prefix=$1
#
# Source our common functions
#
if [ -e /usr/share/xen-tools/common.sh ]; then
. /usr/share/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