1
0
mirror of synced 2026-04-15 15:49:48 +00:00

Test file before modifying

This shuts down errors during t/hook-inittab.t proving, and does
not modify hook during real run.
This commit is contained in:
Stéphane Jourdois
2010-07-11 13:52:47 +02:00
committed by Axel Beckert
parent 43604afa6d
commit c5b4f4bc73
2 changed files with 10 additions and 6 deletions

View File

@@ -27,9 +27,11 @@ logMessage Script $0 starting
#
# Remove the links for upstart
#
rm ${prefix}/etc/event.d/tty[!1]
sed -i -e s/tty1/hvc0/ ${prefix}/etc/event.d/tty1
mv ${prefix}/etc/event.d/tty1 ${prefix}/etc/event.d/hvc0
rm -f ${prefix}/etc/event.d/tty[!1]
[ -f ${prefix}/etc/event.d/tty1 ] && {
sed -i -e s/tty1/hvc0/ ${prefix}/etc/event.d/tty1
mv ${prefix}/etc/event.d/tty1 ${prefix}/etc/event.d/hvc0
}
[ -f ${prefix}/etc/inittab ] && sed -i -e 's/^\([2-6].*:respawn*\)/#\1/' -e 's/^T/#\t/' -e 's/tty1$/hvc0/' ${prefix}/etc/inittab
#

View File

@@ -27,9 +27,11 @@ logMessage Script $0 starting
#
# Remove the links for upstart
#
rm ${prefix}/etc/init/tty[!1].conf
sed -i -e s/tty1/hvc0/ ${prefix}/etc/init/tty1.conf
mv ${prefix}/etc/init/tty1.conf ${prefix}/etc/init/hvc0.conf
rm -f ${prefix}/etc/init/tty[!1].conf
[ -f ${prefix}/etc/event.d/tty1 ] && {
sed -i -e s/tty1/hvc0/ ${prefix}/etc/init/tty1.conf
mv ${prefix}/etc/init/tty1.conf ${prefix}/etc/init/hvc0.conf
}
[ -f ${prefix}/etc/inittab ] && sed -i -e 's/^\([2-6].*:respawn*\)/#\1/' -e 's/^T/#\t/' -e 's/tty1$/hvc0/' ${prefix}/etc/inittab
#