1
0
mirror of synced 2026-04-25 20:11:20 +00:00
Files
xen-tools.xen-tools/hooks/debian/30-fix-inittab
steve d10e0ef0f2 2006-06-09 13:36:14 by steve
Use a fully qualified path to the 'common.sh', so we don't need to
 use chdir() when running our hooks
2006-06-09 13:36:14 +00:00

40 lines
603 B
Bash
Executable File

#!/bin/sh
#
# This script does two things:
#
# 1. Sets the console type for the first terminal to 'console'.
# 2. Comments out all virtual terminals which aren't on the first console.
#
# Steve
# --
# http://www.steve.org.uk/
prefix=$1
#
# Source our common functions
#
if [ -e /usr/lib/xen-tools/common.sh ]; then
. /usr/lib/xen-tools/common.sh
fi
#
# Log our start
#
logMessage Script $0 starting
#
# Do the transformation.
#
sed -i -e 's/tty[0-9]$/console/g' -e 's/^\([2-6].*:respawn*\)/#\1/' -e 's/^T/#\t/' ${prefix}/etc/inittab
#
# Log our finish
#
logMessage Script $0 finished