2006-06-09 10:52:52 by steve
Added
This commit is contained in:
39
hooks/centos4/30-fix-inittab
Executable file
39
hooks/centos4/30-fix-inittab
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/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 ../common.sh ]; then
|
||||
. ../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
|
||||
Reference in New Issue
Block a user