1
0
mirror of synced 2026-02-19 21:35:10 +00:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Steve Kemp
c85144de0f Sync 2008-10-13 19:23:15 +01:00
Steve Kemp
455c16cefe Abort if the generated configuration file already exists.
(Closes: #499475)
2008-10-13 19:18:05 +01:00
Steve Kemp
290a30b1b1 Record the arch for rpm-based distros. Closes: 475125 2008-10-13 19:14:47 +01:00
Steve Kemp
8e2f1236fb Don't test for the POSIX module; per http://www.perlmonks.org/?node_id=689911 2008-06-03 21:49:44 +01:00
Steve Kemp
15436cc018 Correctly sort custom partitions.
#477334
2008-04-30 19:06:36 +01:00
Steve Kemp
3717d0cc15 Correctly force purging of packages in the role script(s).
#477629
2008-04-30 19:05:54 +01:00
Steve Kemp
5d11b820b7 Add the hostname to dom0's /etc/hosts in the correct order.
#477775
2008-04-30 19:05:21 +01:00
Steve Kemp
161ee94632 Add /dev/pts to the fedora guests. #474919 2008-04-30 19:04:04 +01:00
17 changed files with 187 additions and 29 deletions

View File

@@ -1802,6 +1802,18 @@ EOF
exit 127;
}
#
# Already present?
#
my $cfg =
$CONFIG{'output'} . "/" . $CONFIG{'hostname'} . $CONFIG{'extension'};
if ( -e $cfg )
{
print "Configuration file already exists; $cfg\n";
print "Aborting\n";
exit 127;
}
}
@@ -2110,9 +2122,7 @@ EOF
# This makes it easy to mount parent folders first
# (e.g. /var before /var/tmp)
#
@PARTITIONS =
sort { length $a->{'mountpoint'} cmp length $b->{'mountpoint'} }
@PARTITIONS;
@PARTITIONS = sort { length $a->{'mountpoint'} <=> length $b->{'mountpoint'} } @PARTITIONS;
}

20
debian/changelog vendored
View File

@@ -1,3 +1,23 @@
xen-tools (3.9-5) unstable; urgency=medium
- Record the ARCH for RPM-based distros.
(Closes: #475125)
- Abort if the generated configuration file already exists.
(Closes: #499475)
-- Steve Kemp <skx@debian.org> Mon, 13 Oct 2008 19:20:21 +0000
xen-tools (3.9-4) unstable; urgency=high
* Changed two defaults in xen-tools.conf to conform
to the defaults used by the xen packages:
+ serial_device: tty1 -> hvc0
+ disk_device: sda -> xvda
* Priority High because of RC bug. (closes: #499282)
-- Radu Spineanu <radu@debian.org> Tue, 30 Sep 2008 02:02:21 +0300
xen-tools (3.9-3) unstable; urgency=medium
- Ensure that Fedora guests get /dev/pts mounted.

View File

@@ -248,17 +248,17 @@ reiser_options = defaults
#
# If you're using a newer version of the Xen guest kernel you will
# need to make sure that you use 'xvc0' for the guest serial device,
# If you're using the lenny or later version of the Xen guest kernel you will
# need to make sure that you use 'hvc0' for the guest serial device,
# and 'xvdX' instead of 'sdX' for serial devices.
#
# You may specify the things to use here:
#
# serial_device = tty1 #default
# serial_device = xvc0
# serial_device = hvc0 #default
# serial_device = tty1
#
# disk_device = sda #default
# disk_device = xvda
# disk_device = xvda #default
# disk_device = sda
#

44
hooks/centos-4/15-setup-arch Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
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
#
# Record arch, if present.
#
if [ -d $prefix/etc/rpm ]; then
logMessage Found /etc/rpm
#
# If i386 then record this
#
if [ "$arch" = "i386" ]; then
echo "i386-fedora-linux-gnu" >> $prefix/etc/rpm/platform
fi
else
logMessage Failed to find /etc/rpm
fi
#
# Log our finish
#
logMessage Script $0 finished

View File

@@ -91,7 +91,7 @@ if [ -z "${dhcp}" ]; then
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
echo "${ip1} ${name} ${hostname}" >> /etc/hosts
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
#

44
hooks/centos-5/15-setup-arch Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
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
#
# Record arch, if present.
#
if [ -d $prefix/etc/rpm ]; then
logMessage Found /etc/rpm
#
# If i386 then record this
#
if [ "$arch" = "i386" ]; then
echo "i386-fedora-linux-gnu" >> $prefix/etc/rpm/platform
fi
else
logMessage Failed to find /etc/rpm
fi
#
# Log our finish
#
logMessage Script $0 finished

View File

@@ -91,8 +91,7 @@ if [ -z "${dhcp}" ]; then
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
echo "${ip1} ${name} ${hostname}" >> /etc/hosts
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
#
# If we've updated the /etc/hosts file on the host machine

View File

@@ -12,7 +12,7 @@
# might develop.
#
# Steve
# --
# --
#
@@ -130,7 +130,7 @@ disableStartStopDaemon ()
chmod 755 "${daemonfile}"
logMessage "start-stop-daemon disabled / made a stub."
}
#
@@ -151,7 +151,7 @@ enableStartStopDaemon ()
fi
}
#
@@ -182,7 +182,7 @@ removeDebianPackage ()
#
# Purge the packages we've been given.
#
chroot ${prefix} /usr/bin/apt-get remove --purge "$@"
chroot ${prefix} /usr/bin/apt-get remove --yes --purge "$@"
}
@@ -232,7 +232,7 @@ installGentooPackage ()
# Log our options
#
logMessage "Installing Gentoo package ${package} to prefix ${prefix}"
logMessage "NOTE: Not doing anything - this is a stub - FIXME"
}

View File

@@ -91,7 +91,7 @@ if [ -z "${dhcp}" ]; then
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
echo "${ip1} ${name} ${hostname}" >> /etc/hosts
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
#

View File

@@ -91,7 +91,7 @@ if [ -z "${dhcp}" ]; then
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
echo "${ip1} ${name} ${hostname}" >> /etc/hosts
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
#
# If we've updated the /etc/hosts file on the host machine

View File

@@ -90,7 +90,7 @@ if [ -z "${dhcp}" ]; then
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
echo "${ip1} ${name} ${hostname}" >> /etc/hosts
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
#
# If we've updated the /etc/hosts file on the host machine

View File

@@ -0,0 +1,44 @@
#!/bin/sh
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
#
# Record arch, if present.
#
if [ -d $prefix/etc/rpm ]; then
logMessage Found /etc/rpm
#
# If i386 then record this
#
if [ "$arch" = "i386" ]; then
echo "i386-fedora-linux-gnu" >> $prefix/etc/rpm/platform
fi
else
logMessage Failed to find /etc/rpm
fi
#
# Log our finish
#
logMessage Script $0 finished

View File

@@ -91,7 +91,7 @@ if [ -z "${dhcp}" ]; then
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
echo "${ip1} ${name} ${hostname}" >> /etc/hosts
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
#

View File

@@ -64,6 +64,7 @@ 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}}\""
@@ -75,7 +76,7 @@ for part in `seq 1 ${NUMPARTITIONS}`; do
x=$(( $x+1 ))
done
IFS="${OLDIFS}"
case "${partdata2}" in
xfs)
has_xfs=1
@@ -84,7 +85,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

View File

@@ -98,7 +98,7 @@ if [ -z "${dhcp}" ]; then
logMessage Adding ${hostname} and ${name} to /etc/hosts on the host
echo "${ip1} ${name} ${hostname}" >> /etc/hosts
echo "${ip1} ${hostname} ${name}" >> /etc/hosts
#
# If we've updated the /etc/hosts file on the host machine

View File

@@ -25,7 +25,7 @@ use Test::More qw( no_plan );
EOF
for i in `rgrep '^use ' .. | grep -v Expect | grep -v Xen:: | grep -v Moose | awk '{print $2}' | tr -d
for i in `rgrep '^use ' .. | grep -v Expect | grep -v POSIX | grep -v Xen:: | grep -v Moose | awk '{print $2}' | tr -d
\;\(\) | sort | uniq`; \
do \
echo "BEGIN{ use_ok( '$i' ); }"; \

View File

@@ -58,10 +58,6 @@ BEGIN{ use_ok( 'Pod::Usage' ); }
require_ok( 'Pod::Usage' );
BEGIN{ use_ok( 'POSIX' ); }
require_ok( 'POSIX' );
BEGIN{ use_ok( 'strict' ); }
require_ok( 'strict' );