From a8ce63fb6c5ce7819037c030764c802103b0cff3 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 9 Feb 2013 15:25:26 +0100 Subject: g-i: get ltsp logs from edu combi servers --- bin/g-i-installation.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 09894bf3..4453db46 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -285,7 +285,7 @@ normal_action() { *) ;; esac ;; - debian-edu_*minimal) case $TOKEN in + debian-edu_*minimal|debian-edu_*-server) case $TOKEN in 050) do_and_report type root ;; 060) do_and_report key enter @@ -666,12 +666,30 @@ save_logs() { set +e mkdir -p $RESULTS/log sudo cp -r $SYSTEM_MNT/var/log/installer $SYSTEM_MNT/etc/fstab $RESULTS/log/ - sudo chown -R jenkins:jenkins $RESULTS/log/ # # get list of installed packages # sudo chroot $SYSTEM_MNT dpkg -l > $RESULTS/log/dpkg-l || ( echo "Warning: cannot run dpkg inside the installed system." ; sudo ls -la $SYSTEM_MNT ; figlet "fail" ) # + # only on combi-servers: + # mount /opt + # copy LTSP logs and package list + # unmount /opt + # + case $NAME in + debian-edu_*combi-server) sudo guestmount -a $NAME.raw -m /dev/vg_system/opt -o nonempty --ro $SYSTEM_MNT/opt || ( echo "Warning: cannot mount /dev/vg_system/opt" ; figlet "fail" ) + mkdir -p $RESULTS/log/opt + sudo cp -r $SYSTEM_MNT/opt/ltsp/amd64/var/log $RESULTS/log/opt/ + sudo chroot $SYSTEM_MNT/opt/ltsp/amd64 dpkg -l > $RESULTS/log/opt/dpkg-l || ( echo "Warning: cannot run dpkg inside the ltsp chroot." ; sudo ls -la $SYSTEM_MNT/opt/ltsp/amd64 ; figlet "fail" ) + sudo umount -l $SYSTEM_MNT/opt || ( echo "Warning: cannot un-mount $SYSTEM_MNT/opt" ; figlet "fail" ) + ;; + *) ;; + esac + # + # make sure we can read everything after installation + # + sudo chown -R jenkins:jenkins $RESULTS/log/ + # # umount guests # sync -- cgit v1.2.3-70-g09d2