summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-08 15:19:35 +1000
committerAndrew Tridgell <tridge@samba.org>2008-08-08 15:19:35 +1000
commit0b8a17ea0b265da2a39d22fba5fd206c80d996ec (patch)
tree1925e1d85ef6f630481c7ba4dc94cd0464041e10
parent88587ed7a3efdf11f898a6221a140cfffb480acd (diff)
parent7d92895f9d4ca6b17eeb3399cccec382e7b7e639 (diff)
Merge branch 'master' of git://git.samba.org/tridge/autocluster
-rwxr-xr-xautocluster8
-rw-r--r--config.default4
-rw-r--r--functions8
3 files changed, 10 insertions, 10 deletions
diff --git a/autocluster b/autocluster
index b2e228b..7f89cef 100755
--- a/autocluster
+++ b/autocluster
@@ -96,7 +96,7 @@ create_node() {
echo "Creating the disk"
rm -f "$DISK"
- qemu-img create -b "$BASE" -f qcow2 "$DISK"
+ qemu-img create -b "$BASE" -f qcow2 -c "$DISK"
IPNUM=`expr $FIRSTIP + $NODENUMBER`
@@ -136,10 +136,10 @@ create_tsm() {
echo "Creating the disk"
rm -f "$DISK"
- qemu-img create -b "$BASE" -f qcow2 "$DISK"
+ qemu-img create -b "$BASE" -f qcow2 -c "$DISK"
echo "Creating tsm disk"
- qemu-img create -f qcow2 "$TSMDISK" $TSMDISKSIZE
+ qemu-img create -f qcow2 -c "$TSMDISK" $TSMDISKSIZE
# TSM server is first IP in the cluster
IPNUM=$FIRSTIP
@@ -213,7 +213,7 @@ create_base() {
mkdir -p $KVMLOG
echo "Creating the disk"
- qemu-img create -f $BASE_FORMAT "$DISK" $DISKSIZE
+ qemu-img create -f $BASE_FORMAT -c "$DISK" $DISKSIZE
rm -rf tmp
mkdir -p mnt tmp tmp/ISO
diff --git a/config.default b/config.default
index 2d8b905..06d7118 100644
--- a/config.default
+++ b/config.default
@@ -134,7 +134,7 @@ KVMLOG="/var/log/kvm"
ROOTPASSWORD="password"
# install language - make it the same as the installers by default
-LANGUAGE="$LANG"
+LANGUAGE="${LANG:-en_US.UTF-8}"
# name of the system in CIFS protocol
CIFSNAME="Samba01"
@@ -182,4 +182,4 @@ BASE_TEMPLATES="$installdir/base"
NBD_DEVICE="/dev/nbd0"
# the format to use the for qemu base images
-BASE_FORMAT="raw"
+BASE_FORMAT="qcow2"
diff --git a/functions b/functions
index 0787654..3004eb2 100644
--- a/functions
+++ b/functions
@@ -154,14 +154,14 @@ setup_timezone() {
substitute_vars() {(
infile="$1"
outfile="$2"
- delimeter="@"
- delim2="$delimeter$delimeter"
+ delimiter="@"
+ delim2="$delimiter$delimiter"
# get the list of variables used in the template
- VARS=`tr -cs "A-Z0-9_$delimeter" '\012' < "$infile" |
+ VARS=`tr -cs "A-Z0-9_$delimiter" '\012' < "$infile" |
sort -u |
egrep "^$delim2.*$delim2$" |
- cut -d$delimeter -f3`
+ cut -d$delimiter -f3`
rm -f sed.$$
touch sed.$$