From fb9f79d4979d3153db8d52ee5ec5eba75c185279 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 12 Jan 2014 16:07:07 +0000 Subject: [PATCH] configure host serial console git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@309 191e9f34-6774-4a6d-acfc-7664dacd4a2a --- recepies/ganeti/migrate-lxc/H-host-console.sh | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 recepies/ganeti/migrate-lxc/H-host-console.sh diff --git a/recepies/ganeti/migrate-lxc/H-host-console.sh b/recepies/ganeti/migrate-lxc/H-host-console.sh new file mode 100755 index 0000000..7845402 --- /dev/null +++ b/recepies/ganeti/migrate-lxc/H-host-console.sh @@ -0,0 +1,24 @@ +#!/bin/sh -xe + +. ./0-host.sh +. ./0-ganeti.sh + +ssh_host ps ax | grep getty | tee $host/getty +ssh_host cat /proc/cmdline | tee $host/cmdline + +cat $host/getty | grep ttyS0 > $host/serial_console +cat $host/getty | grep console > $host/console + +tail $host/*console + +#pid=`awk '{ print $1 }' $host/console` +#ssh_host kill $pid + +ssh_host cat /etc/inittab > $host/inittab +grep -v ^# $host/inittab | grep console || ( + echo "1:2345:respawn:/sbin/getty 38400 console" | tee -a $host/inittab + rsync $host/inittab root@$host:/etc/ + ssh_host bak diff /etc/inittab + ssh_host init q + ssh_host tail -1 /var/log/daemon.log +) -- 2.20.1