Still fixing up this serial logging stuff

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2018-12-12 12:28:23 -08:00
parent 95b227b97a
commit cb035c7737
2 changed files with 27 additions and 27 deletions

View File

@ -29,24 +29,24 @@ sub post_fail_hook {
# least send out *some* kinda info via the serial line
my $hostip = testapi::host_ip();
if (script_run "ping -c 2 ${hostip}") {
script_run 'printf "\n** X.LOG **\n" > /dev/ttyS0';
script_run "cat /tmp/X.log > /dev/ttyS0";
script_run 'printf "\n** ANACONDA.LOG **\n" > /dev/ttyS0';
script_run "cat /tmp/anaconda.log > /dev/ttyS0";
script_run 'printf "\n** PACKAGING.LOG **\n" > /dev/ttyS0';
script_run "cat /tmp/packaging.log > /dev/ttyS0";
script_run 'printf "\n** STORAGE.LOG **\n" > /dev/ttyS0';
script_run "cat /tmp/storage.log > /dev/ttyS0";
script_run 'printf "\n** SYSLOG **\n" > /dev/ttyS0';
script_run "cat /tmp/syslog > /dev/ttyS0";
script_run 'printf "\n** PROGRAM.LOG **\n" > /dev/ttyS0';
script_run "cat /tmp/program.log > /dev/ttyS0";
script_run 'printf "\n** DNF.LOG **\n" > /dev/ttyS0';
script_run "cat /tmp/dnf.log > /dev/ttyS0";
script_run 'printf "\n** DNF.LIBREPO.LOG **\n" > /dev/ttyS0';
script_run "cat /tmp/dnf.librepo.log > /dev/ttyS0";
script_run 'printf "\n** DNF.RPM.LOG **\n" > /dev/ttyS0';
script_run "cat /tmp/dnf.rpm.log > /dev/ttyS0";
script_run 'printf "\n** X.LOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/X.log > /dev/${serialdev}";
script_run 'printf "\n** ANACONDA.LOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/anaconda.log > /dev/${serialdev}";
script_run 'printf "\n** PACKAGING.LOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/packaging.log > /dev/${serialdev}";
script_run 'printf "\n** STORAGE.LOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/storage.log > /dev/${serialdev}";
script_run 'printf "\n** SYSLOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/syslog > /dev/${serialdev}";
script_run 'printf "\n** PROGRAM.LOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/program.log > /dev/${serialdev}";
script_run 'printf "\n** DNF.LOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/dnf.log > /dev/${serialdev}";
script_run 'printf "\n** DNF.LIBREPO.LOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/dnf.librepo.log > /dev/${serialdev}";
script_run 'printf "\n** DNF.RPM.LOG **\n" > /dev/' . $serialdev;
script_run "cat /tmp/dnf.rpm.log > /dev/${serialdev}";
return;
}

View File

@ -41,15 +41,15 @@ sub post_fail_hook {
# if we don't have tar or a network connection, we'll try and at
# least send out *some* kinda info via the serial line
my $hostip = testapi::host_ip();
if (script_run "rpm -q tar" || script_run "ping -c 2 ${hostip}") {
script_run 'printf "\n** IP ADDR **\n" > /dev/ttyS0';
script_run "ip addr > /dev/ttyS0 2>&1";
script_run 'printf "\n** IP ROUTE **\n" > /dev/ttyS0';
script_run "ip route > /dev/ttyS0 2>&1";
script_run 'printf "\n** NETWORKMANAGER.SERVICE STATUS **\n" > /dev/ttyS0';
script_run "systemctl --no-pager status NetworkManager.service > /dev/ttyS0 2>&1";
script_run 'printf "\n** JOURNAL **\n" > /dev/ttyS0';
script_run "journalctl -b --no-pager > /dev/ttyS0";
if ((script_run "rpm -q tar") || (script_run "ping -c 2 ${hostip}")) {
script_run 'printf "\n** IP ADDR **\n" > /dev/' . $serialdev;
script_run "ip addr > /dev/${serialdev} 2>&1";
script_run 'printf "\n** IP ROUTE **\n" > /dev/' . $serialdev;
script_run "ip route > /dev/${serialdev} 2>&1";
script_run 'printf "\n** NETWORKMANAGER.SERVICE STATUS **\n" > /dev/' . $serialdev;
script_run "systemctl --no-pager status NetworkManager.service > /dev/${serialdev} 2>&1";
script_run 'printf "\n** JOURNAL **\n" > /dev/' . $serialdev;
script_run "journalctl -b --no-pager > /dev/${serialdev}";
return;
}