1
0
mirror of synced 2026-04-25 12:01:21 +00:00
Files
xen-tools.xen-tools/hooks/ubuntu/60-copy-host-files
steve 3a627f0c30 2006-07-21 20:09:45 by steve
Copy /etc/timezone into guest systems running Debina/Ubuntu.
  Closes: #376846
2006-07-21 20:09:46 +00:00

60 lines
851 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/resolv.conf ${prefix}/etc
cp /etc/timezone ${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/resolv.conf ${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