X-Git-Url: http://git.rot13.org/?p=sysadmin-cookbook;a=blobdiff_plain;f=recepies%2Fganeti%2Fmigrate-lxc%2FH-host-console.sh;fp=recepies%2Fganeti%2Fmigrate-lxc%2FH-host-console.sh;h=7845402fd0284d9d50bfac9194e04e5cd47dedae;hp=0000000000000000000000000000000000000000;hb=fb9f79d4979d3153db8d52ee5ec5eba75c185279;hpb=6a1283d1ad403457798cdd8a91a771127e86d4c7 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 +)