1
0
mirror of synced 2026-01-23 02:28:13 +00:00
xen-tools.xen-tools/etc/hook.d/70-install-ssh
steve e788f68963 2006-02-05 14:53:35 by steve
Use a function to install packages.
2006-02-05 14:53:35 +00:00

35 lines
556 B
Bash
Executable File

#!/bin/sh
#
# This script installs OpenSSH upon the new system.
#
# Steve
# --
# $Id: 70-install-ssh,v 1.5 2006-02-05 14:53:35 steve Exp $
prefix=$1
#
# This function installs a package upon the guest image.
#
function install_package
{
package=$1
DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install $package
}
#
# Install the package.
#
install_package 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