1
0
mirror of synced 2026-02-11 10:04:43 +00:00
Files
xen-tools.xen-tools/hooks/dapper/60-copy-host-files
2010-05-17 03:24:39 +02:00

60 lines
847 B
Bash
Executable File

#!/bin/sh
#
# Copy files from a 'skel' directory, if present, into the
# new images
#
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
#
# Copy "required" files from our host.
#
cp /etc/timezone ${prefix}/etc
cp /etc/localtime ${prefix}/etc
#
# If the host has sudo then copy the configuration file, and install
# the package
#
if [ -e /etc/sudoers ]; then
logMessage Installing SUDO too.
#
# Copy file and fixup permissions.
#
cp /etc/sudoers ${prefix}/etc
chown root:root ${prefix}/etc/sudoers
chmod 440 ${prefix}/etc/sudoers
#
# Install sudo
#
installDebianPackage ${prefix} sudo
fi
#
# Log our finish
#
logMessage Script $0 finished