[Fedora-xen] XenGetty

Razvan Corneliu C.R. VILT razvan.vilt at linux360.ro
Mon Jul 3 17:55:07 UTC 2006


After using the FC5 I created a rather trivial bash script that can spawn
either xenconsole or mingetty on a given console. In order to use-it you
have to add/change inittab entries. For example, to have the Rawhide XenU
on tty5 if it's available or mingetty if not, you would have to change the
mingetty tty5 line to the following (without the quotes:
"5:345:respawn:/usr/sbin/xengetty Rawhide tty5"

Here is the script (it's assumed that you'll put-it into /usr/sbin under
the xengetty name):
--------BEGIN SCRIPT------
#!/bin/bash
# Small wrapper around xm console.
# It will start mingetty if the domain is not available

DOMAIN=$1
TTY=$2
XM=/usr/sbin/xm
GETTY=/sbin/mingetty
DOMID=`$XM domid $DOMAIN 2>/dev/null`

if [ -z $DOMID ]; then
   exec $GETTY $TTY
else
   exec $XM console $DOMID < /dev/$TTY > /dev/$TTY 2> /dev/$TTY
fi

------END OF SCRIPT-----

I created the script as I needed the feature and, although trivial, I am
sure that mentioning this in the wiki might be helpful for others as
well...

Cheers,
Razvan




More information about the Fedora-xen mailing list