/[sysadmin-cookbook]/recepies/ganeti/migrate-lxc/H-host-console.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /recepies/ganeti/migrate-lxc/H-host-console.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 309 - (show annotations)
Sun Jan 12 16:07:07 2014 UTC (10 years, 3 months ago) by dpavlin
File MIME type: application/x-sh
File size: 611 byte(s)
configure host serial console

1 #!/bin/sh -xe
2
3 . ./0-host.sh
4 . ./0-ganeti.sh
5
6 ssh_host ps ax | grep getty | tee $host/getty
7 ssh_host cat /proc/cmdline | tee $host/cmdline
8
9 cat $host/getty | grep ttyS0 > $host/serial_console
10 cat $host/getty | grep console > $host/console
11
12 tail $host/*console
13
14 #pid=`awk '{ print $1 }' $host/console`
15 #ssh_host kill $pid
16
17 ssh_host cat /etc/inittab > $host/inittab
18 grep -v ^# $host/inittab | grep console || (
19 echo "1:2345:respawn:/sbin/getty 38400 console" | tee -a $host/inittab
20 rsync $host/inittab root@$host:/etc/
21 ssh_host bak diff /etc/inittab
22 ssh_host init q
23 ssh_host tail -1 /var/log/daemon.log
24 )

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26