Compare commits
6 Commits
debian-4.1
...
debian-3.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85846b480d | ||
|
|
f73eb76b1e | ||
|
|
f56ebbaf68 | ||
|
|
09bf1cd84d | ||
|
|
7d9b9b9881 | ||
|
|
aba8e1b411 |
10
Makefile
10
Makefile
@@ -12,9 +12,8 @@
|
||||
#
|
||||
# Only used to build distribution tarballs.
|
||||
#
|
||||
TMP ?= /tmp
|
||||
DIST_PREFIX = ${TMP}
|
||||
VERSION = 4.1
|
||||
VERSION = 3.9
|
||||
BASE = xen-tools
|
||||
|
||||
|
||||
@@ -57,7 +56,7 @@ clean:
|
||||
@find . -name '*.tmp' -exec rm \{\} \;
|
||||
@find . -name 'tags' -exec rm \{\} \;
|
||||
@find . -name '*.8.gz' -exec rm \{\} \;
|
||||
@if [ -d man ]; then rm -rf man ; fi
|
||||
@find man -name '*.html' -exec rm \{\} \;
|
||||
@if [ -e build-stamp ]; then rm -f build-stamp ; fi
|
||||
@if [ -e configure-stamp ]; then rm -f configure-stamp ; fi
|
||||
@if [ -d debian/xen-tools ]; then rm -rf ./debian/xen-tools; fi
|
||||
@@ -159,8 +158,6 @@ install-hooks:
|
||||
cp -R hooks/edgy/*-* ${prefix}/usr/lib/xen-tools/edgy.d/
|
||||
-cd ${prefix}/usr/lib/xen-tools/ && ln -s edgy.d feisty.d
|
||||
-cd ${prefix}/usr/lib/xen-tools/ && ln -s edgy.d gutsy.d
|
||||
-cd ${prefix}/usr/lib/xen-tools/ && ln -s edgy.d hardy.d
|
||||
-cd ${prefix}/usr/lib/xen-tools/ && ln -s edgy.d intrepid.d
|
||||
mkdir -p ${prefix}/usr/lib/xen-tools/dapper.d/
|
||||
cp -R hooks/dapper/*-* ${prefix}/usr/lib/xen-tools/dapper.d/
|
||||
mkdir -p ${prefix}/usr/lib/xen-tools/edgy.d/
|
||||
@@ -196,7 +193,6 @@ install: fixup-perms install-bin install-etc install-hooks install-libraries ins
|
||||
# Build our manpages via the `pod2man` command.
|
||||
#
|
||||
manpages:
|
||||
mkdir man
|
||||
cd bin; for i in *-*; do pod2man --release=${VERSION} --official --section=8 $$i ../man/$$i.8; done
|
||||
for i in man/*.8; do gzip --force -9 $$i; done
|
||||
|
||||
@@ -239,7 +235,7 @@ tidy:
|
||||
if [ -x /usr/bin/perltidy ]; then \
|
||||
for i in bin/*-*; do \
|
||||
echo "tidying $$i"; \
|
||||
perltidy $$i \
|
||||
perltidy -b -nt -bt=2 -sbt=1 -bl -mbl=3 -sbl -bbs -bbb -anl -lp $$i \
|
||||
; done \
|
||||
; fi
|
||||
|
||||
|
||||
@@ -73,8 +73,6 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH.
|
||||
|
||||
--hooks Specify whether to run hooks after the image is created.
|
||||
|
||||
--no-hosts Don't touch /etc/hosts on the dom0.
|
||||
|
||||
--partitions Use a specific partition layout configuration file.
|
||||
Not supported with the image-dev and swap-dev options.
|
||||
Parameters fs, size, swap and noswap are ignored when
|
||||
@@ -663,7 +661,7 @@ my $FAIL = 0;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
|
||||
@@ -1338,7 +1336,7 @@ sub parseCommandLineArguments
|
||||
#
|
||||
# Parse options.
|
||||
#
|
||||
if ( !GetOptions(
|
||||
GetOptions(
|
||||
|
||||
# Mandatory
|
||||
"dist=s", \$CONFIG{'dist'},
|
||||
@@ -1361,18 +1359,14 @@ sub parseCommandLineArguments
|
||||
"image-dev=s", \$install{'image-dev'},
|
||||
"swap-dev=s", \$install{'swap-dev'},
|
||||
|
||||
# Host options
|
||||
"no-hosts", \$CONFIG{'nohosts'},
|
||||
|
||||
# Networking options
|
||||
"dhcp", \$CONFIG{'dhcp'},
|
||||
"dhcp!", \$CONFIG{'dhcp'},
|
||||
"gateway=s", \$CONFIG{'gateway'},
|
||||
"hostname=s", \$CONFIG{'hostname'},
|
||||
"ip=s@", \$CONFIG{'ip'},
|
||||
"mac=s", \$CONFIG{'mac'},
|
||||
"netmask=s", \$CONFIG{'netmask'},
|
||||
"broadcast=s", \$CONFIG{'broadcast'},
|
||||
"vifname=s", \$CONFIG{'vifname'},
|
||||
"p2p=s", \$CONFIG{'p2p'},
|
||||
|
||||
# Exclusive
|
||||
@@ -1383,38 +1377,34 @@ sub parseCommandLineArguments
|
||||
"install-source=s", \$CONFIG{'install-source'},
|
||||
|
||||
# Misc. options
|
||||
"accounts", \$CONFIG{'accounts'},
|
||||
"accounts!", \$CONFIG{'accounts'},
|
||||
"admins=s", \$CONFIG{'admins'},
|
||||
"arch=s", \$CONFIG{'arch'},
|
||||
"fs=s", \$CONFIG{'fs'},
|
||||
"boot", \$CONFIG{'boot'},
|
||||
"boot!", \$CONFIG{'boot'},
|
||||
"cache=s", \$CONFIG{'cache'},
|
||||
"config=s", \$CONFIG{'config'},
|
||||
"ide", \$CONFIG{'ide'},
|
||||
"ide!", \$CONFIG{'ide'},
|
||||
"install=i", \$CONFIG{'install'},
|
||||
"hooks=i", \$CONFIG{'hooks'},
|
||||
"pygrub", \$CONFIG{'pygrub'},
|
||||
"passwd", \$CONFIG{'passwd'},
|
||||
"passwd!", \$CONFIG{'passwd'},
|
||||
"partitions=s", \$CONFIG{'partitions'},
|
||||
"role=s", \$CONFIG{'role'},
|
||||
"role-args=s", \$CONFIG{'role-args'},
|
||||
"roledir=s", \$CONFIG{'roledir'},
|
||||
"force", \$CONFIG{'force'},
|
||||
"keep", \$CONFIG{'keep'},
|
||||
"force!", \$CONFIG{'force'},
|
||||
"keep!", \$CONFIG{'keep'},
|
||||
"template=s", \$CONFIG{'template'},
|
||||
"output=s", \$CONFIG{'output'},
|
||||
"extension=s", \$CONFIG{'extension'},
|
||||
|
||||
# Help options
|
||||
"debug", \$CONFIG{'debug'},
|
||||
"debug!", \$CONFIG{'debug'},
|
||||
"help", \$HELP,
|
||||
"manual", \$MANUAL,
|
||||
"verbose", \$CONFIG{'verbose'},
|
||||
"version", \$VERSION
|
||||
) )
|
||||
{
|
||||
exit;
|
||||
}
|
||||
);
|
||||
|
||||
pod2usage(1) if $HELP;
|
||||
pod2usage( -verbose => 2 ) if $MANUAL;
|
||||
@@ -1819,17 +1809,9 @@ EOF
|
||||
$CONFIG{'output'} . "/" . $CONFIG{'hostname'} . $CONFIG{'extension'};
|
||||
if ( -e $cfg )
|
||||
{
|
||||
if ( $CONFIG{'force'} )
|
||||
{
|
||||
$CONFIG{'verbose'} && print "Removing existing file: $cfg\n";
|
||||
unlink( $cfg );
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Configuration file already exists; $cfg\n";
|
||||
print "Aborting\n";
|
||||
exit 127;
|
||||
}
|
||||
print "Configuration file already exists; $cfg\n";
|
||||
print "Aborting\n";
|
||||
exit 127;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2273,7 +2255,6 @@ sub showSummary
|
||||
logprint("Partitions : ");
|
||||
foreach my $partition (@PARTITIONS)
|
||||
{
|
||||
next if ( !$partition );
|
||||
$info = sprintf( '%-15s %-5s (%s)',
|
||||
( $partition->{'type'} ne 'swap' )
|
||||
? $partition->{'mountpoint'}
|
||||
|
||||
@@ -130,7 +130,7 @@ $CONFIG{'template'} = '/etc/xen-tools/xm-nfs.tmpl';
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
# store version number away.
|
||||
|
||||
@@ -169,7 +169,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ $CONFIG{'prefix'} = "/etc/xen";
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -156,7 +156,7 @@ $CONFIG{'template'} = '/etc/xen-tools/xm.tmpl';
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.1';
|
||||
my $RELEASE = '3.9';
|
||||
|
||||
|
||||
#
|
||||
|
||||
11
debian/changelog
vendored
11
debian/changelog
vendored
@@ -1,14 +1,3 @@
|
||||
xen-tools (4.1-1) unstable; urgency=low
|
||||
|
||||
- New command line argument '--no-hosts' to avoid touching /etc/hosts
|
||||
on dom0
|
||||
- New command line argument '--pygrub' to setup a guest for pygrub use.
|
||||
- Generated configuration file should work for --image-dev + --swap-dev
|
||||
again.
|
||||
- Always use /dev/pts for new images.
|
||||
|
||||
-- Steve Kemp <skx@debian.org> Sun, 23 Nov 2008 13:06:01 +0000
|
||||
|
||||
xen-tools (3.9-6) unstable; urgency=low
|
||||
|
||||
- Allow command line flags to be unset.
|
||||
|
||||
0
debian/examples/setup-kernel-initrd
vendored
Executable file → Normal file
0
debian/examples/setup-kernel-initrd
vendored
Executable file → Normal file
0
debian/examples/update-modules
vendored
Executable file → Normal file
0
debian/examples/update-modules
vendored
Executable file → Normal file
0
debian/preinst
vendored
Executable file → Normal file
0
debian/preinst
vendored
Executable file → Normal file
77
etc/xm.tmpl
77
etc/xm.tmpl
@@ -6,76 +6,37 @@
|
||||
#
|
||||
# Kernel + memory size
|
||||
#
|
||||
{ if ( ( $kernel ) && ( !defined($pygrub)) )
|
||||
{ if ( $kernel )
|
||||
{
|
||||
$OUT.= "kernel = '$kernel'";
|
||||
}
|
||||
}
|
||||
{ if ( ( $initrd ) && ( !defined($pygrub)) )
|
||||
{ if ( $initrd )
|
||||
{
|
||||
$OUT.= "ramdisk = '$initrd'";
|
||||
}
|
||||
}
|
||||
{
|
||||
if ( $pygrub )
|
||||
{
|
||||
$OUT .= "bootloader = '/usr/bin/pygrub'\n";
|
||||
}
|
||||
}
|
||||
memory = '{$memory}'
|
||||
|
||||
#
|
||||
# Disk device(s).
|
||||
#
|
||||
{
|
||||
if ( !defined($image_vbd ) )
|
||||
{
|
||||
for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
|
||||
{
|
||||
for ( my $i = $#PARTITIONS; $i >= 0 ; $i-- )
|
||||
{
|
||||
if ( $PARTITIONS[$i]{'mountpoint'} eq '/' )
|
||||
{
|
||||
$OUT .= "root = '/dev/$device" . ($i + 1) . " ro'\n";
|
||||
}
|
||||
}
|
||||
$OUT .= "disk = [\n";
|
||||
for ( my $i = $#PARTITIONS; $i >= 0 ; $i-- )
|
||||
{
|
||||
$OUT .= " '$PARTITIONS[$i]{'imagetype'}$PARTITIONS[$i]{'image'},$device" . ( $i + 1 ) .",w',\n";
|
||||
}
|
||||
$OUT .= " ]\n";
|
||||
}
|
||||
$OUT .= "disk = [\n";
|
||||
for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
|
||||
{
|
||||
$OUT .= " '$PARTITIONS[$i]{'imagetype'}$PARTITIONS[$i]{'image'},$device" . ( $i + 1 ) .",w',\n";
|
||||
}
|
||||
$OUT .= " ]\n";
|
||||
}
|
||||
|
||||
#
|
||||
# Physical volumes
|
||||
#
|
||||
{
|
||||
if ( ( $swap_vbd ) && ( $image_vbd ) )
|
||||
{
|
||||
$OUT .= "root = '/dev/$device" . "2 ro'\n";
|
||||
|
||||
$OUT .= "disk = [ ";
|
||||
|
||||
if ( $image_vbd )
|
||||
{
|
||||
$OUT .= "'$image_vbd," . $device . "2,w'";
|
||||
|
||||
}
|
||||
|
||||
if ( $swap_vbd )
|
||||
{
|
||||
if ( $image_vbd )
|
||||
{
|
||||
$OUT .= ",";
|
||||
}
|
||||
|
||||
$OUT .= "'$swap_vbd," . $device . "1,w'";
|
||||
}
|
||||
$OUT .= " ]\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Hostname
|
||||
#
|
||||
@@ -91,12 +52,12 @@ name = '{$hostname}'
|
||||
# Setup the mac address, if present.
|
||||
my $m = '';
|
||||
if ( $mac )
|
||||
{
|
||||
{
|
||||
$m = "mac=$mac"
|
||||
}
|
||||
|
||||
$OUT .= "vif = [ '$m' ]";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#
|
||||
@@ -104,20 +65,12 @@ name = '{$hostname}'
|
||||
#
|
||||
my $m = '';
|
||||
if ( $mac )
|
||||
{
|
||||
{
|
||||
$m = ",mac=$mac"
|
||||
}
|
||||
|
||||
my $vn = '';
|
||||
if ( $vifname )
|
||||
{
|
||||
$vn = ",vifname=$vifname";
|
||||
}
|
||||
|
||||
$OUT .= "vif = [ 'ip=$ip1";
|
||||
$OUT .= "$m";
|
||||
$OUT .= "$vn";
|
||||
$OUT .= "' ]";
|
||||
$OUT .= "vif = [ 'ip=$ip1";
|
||||
$OUT .= "$m' ]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
0
hooks/centos-4/15-setup-arch
Executable file → Normal file
0
hooks/centos-4/15-setup-arch
Executable file → Normal file
@@ -89,27 +89,23 @@ if [ -z "${dhcp}" ]; then
|
||||
#
|
||||
name=`echo ${hostname} | awk -F. '{print $1}'`
|
||||
|
||||
if [ -z "${nohosts}" ]; then
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
|
||||
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -64,7 +64,6 @@ cat <<E_O_FSTAB > ${prefix}/etc/fstab
|
||||
#
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
proc /proc proc defaults 0 0
|
||||
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
|
||||
E_O_FSTAB
|
||||
for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
eval "PARTITION=\"\${PARTITION${part}}\""
|
||||
@@ -76,7 +75,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
x=$(( $x+1 ))
|
||||
done
|
||||
IFS="${OLDIFS}"
|
||||
|
||||
|
||||
case "${partdata2}" in
|
||||
xfs)
|
||||
has_xfs=1
|
||||
@@ -85,7 +84,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
has_reiserfs=1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if [ "${partdata2}" = "swap" ]; then
|
||||
echo "/dev/${device}${part} none swap sw 0 0" >> ${prefix}/etc/fstab
|
||||
else
|
||||
|
||||
0
hooks/centos-5/15-setup-arch
Executable file → Normal file
0
hooks/centos-5/15-setup-arch
Executable file → Normal file
@@ -89,24 +89,22 @@ if [ -z "${dhcp}" ]; then
|
||||
#
|
||||
name=`echo ${hostname} | awk -F. '{print $1}'`
|
||||
|
||||
if [ -z "${nohosts}" ]; then
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -89,25 +89,24 @@ if [ -z "${dhcp}" ]; then
|
||||
#
|
||||
name=`echo ${hostname} | awk -F. '{print $1}'`
|
||||
|
||||
if [ -z "${nohosts}" ]; then
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
|
||||
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -61,7 +61,6 @@ cat <<E_O_FSTAB > ${prefix}/etc/fstab
|
||||
#
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
proc /proc proc defaults 0 0
|
||||
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
|
||||
E_O_FSTAB
|
||||
for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
eval "PARTITION=\"\${PARTITION${part}}\""
|
||||
@@ -73,7 +72,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
x=$(( $x+1 ))
|
||||
done
|
||||
IFS="${OLDIFS}"
|
||||
|
||||
|
||||
case "${partdata2}" in
|
||||
xfs)
|
||||
has_xfs=1
|
||||
@@ -82,7 +81,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
has_reiserfs=1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if [ "${partdata2}" = "swap" ]; then
|
||||
echo "/dev/${device}${part} none swap sw 0 0" >> ${prefix}/etc/fstab
|
||||
else
|
||||
|
||||
@@ -89,24 +89,23 @@ if [ -z "${dhcp}" ]; then
|
||||
#
|
||||
name=`echo ${hostname} | awk -F. '{print $1}'`
|
||||
|
||||
if [ -z "${nohosts}" ]; then
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -60,7 +60,6 @@ cat <<E_O_FSTAB > ${prefix}/etc/fstab
|
||||
#
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
proc /proc proc defaults 0 0
|
||||
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
|
||||
E_O_FSTAB
|
||||
for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
eval "PARTITION=\"\${PARTITION${part}}\""
|
||||
@@ -72,7 +71,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
x=$(( $x+1 ))
|
||||
done
|
||||
IFS="${OLDIFS}"
|
||||
|
||||
|
||||
case "${partdata2}" in
|
||||
xfs)
|
||||
has_xfs=1
|
||||
@@ -81,7 +80,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
has_reiserfs=1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if [ "${partdata2}" = "swap" ]; then
|
||||
echo "/dev/${device}${part} none swap sw 0 0" >> ${prefix}/etc/fstab
|
||||
else
|
||||
|
||||
@@ -41,8 +41,7 @@ cp /etc/resolv.conf ${prefix}/etc
|
||||
#
|
||||
# Process any of the present apt-conf setup lines.
|
||||
#
|
||||
for i in /etc/apt/apt.conf $(run-parts --list /etc/apt/apt.conf.d) ; do
|
||||
|
||||
for i in /etc/apt/apt.conf /etc/apt/apt.conf.d/* ; do
|
||||
|
||||
#
|
||||
# If the file exists. (Need this in case the literal glob fails.)
|
||||
@@ -53,8 +52,7 @@ for i in /etc/apt/apt.conf $(run-parts --list /etc/apt/apt.conf.d) ; do
|
||||
# Save the matching line(s) to the proxy guess file.
|
||||
#
|
||||
logMessage The use of a proxy detected.
|
||||
|
||||
grep -v '^//' $i | grep -i HTTP::Proxy >>${prefix}/etc/apt/apt.conf.d/proxy-guess
|
||||
grep -i HTTP::Proxy $i >> ${prefix}/etc/apt/apt.conf.d/proxy-guess
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
@@ -42,10 +42,7 @@ if [ ! -z "${serial_device}" ]; then
|
||||
|
||||
# replace existing device.
|
||||
mv ${prefix}/etc/event.d/tty1 ${prefix}/etc/event.d/${serial_device}
|
||||
sed -i -e s/tty1/${serial_device}/ ${prefix}/etc/event.d/${serial_device}
|
||||
[ -f ${prefix}/etc/inittab ] && sed -i -e s/tty1/${serial_device}/ ${prefix}/etc/inittab
|
||||
|
||||
|
||||
sed -i -e s/tty1/${serial_device}/ ${prefix}/etc/inittab
|
||||
|
||||
# make sure that it is allowed to login.
|
||||
echo $serial_device >> ${prefix}/etc/securetty
|
||||
|
||||
@@ -88,24 +88,23 @@ if [ -z "${dhcp}" ]; then
|
||||
#
|
||||
name=`echo ${hostname} | awk -F. '{print $1}'`
|
||||
|
||||
if [ -z "${nohosts}" ]; then
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -61,7 +61,6 @@ cat <<E_O_FSTAB > ${prefix}/etc/fstab
|
||||
#
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
proc /proc proc defaults 0 0
|
||||
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
|
||||
E_O_FSTAB
|
||||
for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
eval "PARTITION=\"\${PARTITION${part}}\""
|
||||
@@ -73,7 +72,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
x=$(( $x+1 ))
|
||||
done
|
||||
IFS="${OLDIFS}"
|
||||
|
||||
|
||||
case "${partdata2}" in
|
||||
xfs)
|
||||
has_xfs=1
|
||||
@@ -82,7 +81,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
has_reiserfs=1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if [ "${partdata2}" = "swap" ]; then
|
||||
echo "/dev/${device}${part} none swap sw 0 0" >> ${prefix}/etc/fstab
|
||||
else
|
||||
|
||||
0
hooks/fedora-core-6/15-setup-arch
Executable file → Normal file
0
hooks/fedora-core-6/15-setup-arch
Executable file → Normal file
@@ -89,25 +89,23 @@ if [ -z "${dhcp}" ]; then
|
||||
#
|
||||
name=`echo ${hostname} | awk -F. '{print $1}'`
|
||||
|
||||
if [ -z "${nohosts}" ]; then
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
|
||||
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -96,24 +96,23 @@ if [ -z "${dhcp}" ]; then
|
||||
#
|
||||
name=`echo ${hostname} | awk -F. '{print $1}'`
|
||||
|
||||
if [ -z "${nohosts}" ]; then
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
|
||||
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
|
||||
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
#
|
||||
# If we've updated the /etc/hosts file on the host machine
|
||||
# and there is an installation of dnsmasq installed then
|
||||
# reload it.
|
||||
#
|
||||
# This will let the local LAN clients lookup the new address.
|
||||
#
|
||||
if [ -x /usr/sbin/dnsmasq ] ; then
|
||||
if [ -e /var/run/dnsmasq.pid ]; then
|
||||
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
logMessage Allowing DNSMasq to restart.
|
||||
|
||||
kill -HUP `cat /var/run/dnsmasq.pid`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -61,7 +61,6 @@ cat <<E_O_FSTAB > ${prefix}/etc/fstab
|
||||
#
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
proc /proc proc defaults 0 0
|
||||
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
|
||||
E_O_FSTAB
|
||||
for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
eval "PARTITION=\"\${PARTITION${part}}\""
|
||||
@@ -73,7 +72,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
x=$(( $x+1 ))
|
||||
done
|
||||
IFS="${OLDIFS}"
|
||||
|
||||
|
||||
case "${partdata2}" in
|
||||
xfs)
|
||||
has_xfs=1
|
||||
@@ -82,7 +81,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
|
||||
has_reiserfs=1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if [ "${partdata2}" = "swap" ]; then
|
||||
echo "/dev/${device}${part} none swap sw 0 0" >> ${prefix}/etc/fstab
|
||||
else
|
||||
|
||||
41
roles/puppet
41
roles/puppet
@@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This role installs Puppet upon the new guest system.
|
||||
#
|
||||
# It must make sure that the server is not running before it exits
|
||||
# otherwise the temporary mounted directory will not be unmountable.
|
||||
#
|
||||
|
||||
prefix=$1
|
||||
|
||||
#
|
||||
# Source our common functions - this will let us install a Debian package.
|
||||
#
|
||||
if [ -e /usr/lib/xen-tools/common.sh ]; then
|
||||
. /usr/lib/xen-tools/common.sh
|
||||
else
|
||||
echo "Installation problem"
|
||||
fi
|
||||
|
||||
#
|
||||
# Log our start
|
||||
#
|
||||
logMessage Script $0 starting
|
||||
|
||||
|
||||
#
|
||||
# Install ssh
|
||||
#
|
||||
installDebianPackage ${prefix} puppet
|
||||
|
||||
|
||||
#
|
||||
# Make sure sshd isn't running, this will cause our unmounting of the
|
||||
# disk image to fail..
|
||||
#
|
||||
chroot ${prefix} /etc/init.d/puppet stop
|
||||
|
||||
#
|
||||
# Log our finish
|
||||
#
|
||||
logMessage Script $0 finished
|
||||
0
t/quoted-strings.t
Executable file → Normal file
0
t/quoted-strings.t
Executable file → Normal file
Reference in New Issue
Block a user