[xen-tools-dev] [PATCH] Test file before modifying
Dmitry Nedospasov
dmitry at nedos.net
Sun Jul 18 20:15:40 CEST 2010
Okay, well i was a bit upset today to see that this broke lucid/karmic.
I just patched this [1]
Regards,
D.
[1] http://gitorious.com/xen-tools/xen-tools/commit/3951ce
On Sun, Jul 11, 2010 at 03:38:52PM +0200, Stéphane Jourdois wrote:
> This shuts down errors during t/hook-inittab.t proving, and does
> not modify hook during real run.
> diff --git a/hooks/karmic/30-disable-gettys b/hooks/karmic/30-disable-gettys
> index c471be9..6752e0c 100755
> --- a/hooks/karmic/30-disable-gettys
> +++ b/hooks/karmic/30-disable-gettys
> @@ -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
>
> #
> --
> 1.5.6.5
--
Dmitry Nedospasov <dmitry at nedos.net>
http://nedos.net - Twitter: @nedos - GPG: 0x5EED4EED
More information about the xen-tools-dev
mailing list