Anaconda log will help us to analyse failure of installation.

Signed-off-by: Qingtang Zhou <qz...@redhat.com>
---
 client/tests/kvm/unattended/Fedora-10.ks     |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/Fedora-11.ks     |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/Fedora-12.ks     |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/Fedora-13.ks     |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/Fedora-14.ks     |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/Fedora-8.ks      |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/Fedora-9.ks      |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/RHEL-3-series.ks |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/RHEL-4-series.ks |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/RHEL-5-series.ks |   35 ++++++++++++++++++++++++++
 client/tests/kvm/unattended/RHEL-6-series.ks |   35 ++++++++++++++++++++++++++
 11 files changed, 385 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/unattended/Fedora-10.ks 
b/client/tests/kvm/unattended/Fedora-10.ks
index 081d41a..49bdfbb 100644
--- a/client/tests/kvm/unattended/Fedora-10.ks
+++ b/client/tests/kvm/unattended/Fedora-10.ks
@@ -24,6 +24,41 @@ poweroff
 @development-tools
 ntpdate
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/Fedora-11.ks 
b/client/tests/kvm/unattended/Fedora-11.ks
index c339220..17c5721 100644
--- a/client/tests/kvm/unattended/Fedora-11.ks
+++ b/client/tests/kvm/unattended/Fedora-11.ks
@@ -24,6 +24,41 @@ autopart
 ntpdate
 %end
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/Fedora-12.ks 
b/client/tests/kvm/unattended/Fedora-12.ks
index c339220..17c5721 100644
--- a/client/tests/kvm/unattended/Fedora-12.ks
+++ b/client/tests/kvm/unattended/Fedora-12.ks
@@ -24,6 +24,41 @@ autopart
 ntpdate
 %end
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/Fedora-13.ks 
b/client/tests/kvm/unattended/Fedora-13.ks
index c339220..17c5721 100644
--- a/client/tests/kvm/unattended/Fedora-13.ks
+++ b/client/tests/kvm/unattended/Fedora-13.ks
@@ -24,6 +24,41 @@ autopart
 ntpdate
 %end
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/Fedora-14.ks 
b/client/tests/kvm/unattended/Fedora-14.ks
index e1323cd..f9fa144 100644
--- a/client/tests/kvm/unattended/Fedora-14.ks
+++ b/client/tests/kvm/unattended/Fedora-14.ks
@@ -25,6 +25,41 @@ ntpdate
 dmidecode
 %end
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/Fedora-8.ks 
b/client/tests/kvm/unattended/Fedora-8.ks
index 9403191..1f45699 100644
--- a/client/tests/kvm/unattended/Fedora-8.ks
+++ b/client/tests/kvm/unattended/Fedora-8.ks
@@ -23,6 +23,41 @@ reboot
 @development-tools
 ntpdate
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/Fedora-9.ks 
b/client/tests/kvm/unattended/Fedora-9.ks
index a7d5399..a325657 100644
--- a/client/tests/kvm/unattended/Fedora-9.ks
+++ b/client/tests/kvm/unattended/Fedora-9.ks
@@ -24,6 +24,41 @@ poweroff
 @development-tools
 ntpdate
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/RHEL-3-series.ks 
b/client/tests/kvm/unattended/RHEL-3-series.ks
index 0c6d334..5012000 100644
--- a/client/tests/kvm/unattended/RHEL-3-series.ks
+++ b/client/tests/kvm/unattended/RHEL-3-series.ks
@@ -23,6 +23,41 @@ skipx
 @ development-tools
 ntp
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('/sbin/ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up')
diff --git a/client/tests/kvm/unattended/RHEL-4-series.ks 
b/client/tests/kvm/unattended/RHEL-4-series.ks
index 83ae918..9760f57 100644
--- a/client/tests/kvm/unattended/RHEL-4-series.ks
+++ b/client/tests/kvm/unattended/RHEL-4-series.ks
@@ -23,6 +23,41 @@ poweroff
 @ development-tools
 ntp
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/RHEL-5-series.ks 
b/client/tests/kvm/unattended/RHEL-5-series.ks
index 7ffd19f..cbfb171 100644
--- a/client/tests/kvm/unattended/RHEL-5-series.ks
+++ b/client/tests/kvm/unattended/RHEL-5-series.ks
@@ -25,6 +25,41 @@ kexec-tools
 watchdog
 ntp
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
diff --git a/client/tests/kvm/unattended/RHEL-6-series.ks 
b/client/tests/kvm/unattended/RHEL-6-series.ks
index 166c499..4b0629a 100644
--- a/client/tests/kvm/unattended/RHEL-6-series.ks
+++ b/client/tests/kvm/unattended/RHEL-6-series.ks
@@ -28,6 +28,41 @@ NetworkManager
 ntpdate
 watchdog
 
+%pre --interpreter /usr/bin/python
+import socket, os, sys
+
+try:
+    pid = os.fork()
+except OSError, e:
+    sys.exit(1)
+
+if pid > 0:
+    sys.exit(0)
+
+f = open("/tmp/anaconda.log", 'r')
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+os.close(sys.stderr.fileno())
+os.close(sys.stdout.fileno())
+
+sock.bind(('', 12322))
+sock.listen(1)
+
+buf = ""
+while True:
+    client, addr = sock.accept()
+    o = f.readlines(1024)
+    o = "".join(o)
+    if buf or o:
+        client.send(o)
+        data = client.recv(64)
+        if "ok" in data:
+            buf = ""
+        else:
+            buf += o
+    client.close()
+%end
+
 %post --interpreter /usr/bin/python
 import socket, os
 os.system('dhclient')
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to