[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCHES] 686-bigmem/Xen enabled netboot images



On Thu, 2008-07-10 at 15:23 -0300, Otavio Salvador wrote:
> Ian Campbell <ijc@hellion.org.uk> writes:
> 
> <...>
> > --- packages/finish-install/finish-install.d/90console	(revision 54198)
> > +++ packages/finish-install/finish-install.d/90console	(working copy)
<...>
> Bad coding style. Please take a look at
> installer/doc/devel/codingstyle.txt on our svn repository.

Sorry, I hadn't seen that doc. New version attached.

> All other patches are OK for me. If noone objects I think they could
> be applied (except that 686-bigmem netboot image would need to be
> disabled until we don't have the udebs availalable).

Makes sense. Thanks.

Ian
-- 
Ian Campbell

Profanity is the one language all programmers know best.
Index: packages/finish-install/debian/changelog
===================================================================
--- packages/finish-install/debian/changelog	(revision 54198)
+++ packages/finish-install/debian/changelog	(working copy)
@@ -1,3 +1,9 @@
+finish-install (2.19) UNRELEASED; urgency=low
+
+  * Add a getty to hvc0 if Xen is detected.
+
+ -- Ian Campbell <ijc@hellion.org.uk>  Thu, 10 Jul 2008 18:41:24 +0100
+
 finish-install (2.18) unstable; urgency=low
 
   [ Updated translations ]
Index: packages/finish-install/finish-install.d/90console
===================================================================
--- packages/finish-install/finish-install.d/90console	(revision 54198)
+++ packages/finish-install/finish-install.d/90console	(working copy)
@@ -118,3 +118,25 @@
 		    /target/etc/event.d/tty1 > /target/etc/event.d/$console
 	fi
 fi
+
+if [ -e /sys/bus/xen ]; then
+	console=hvc0
+	log "Setting up virtualized serial console on /dev/$console"
+	if [ -f /target/etc/inittab ]; then
+		log "adding console to /etc/inittab"
+		console_line="co:2345:respawn:/sbin/getty $console 9600 linux"
+		if grep -q "^#\?co:" /target/etc/inittab; then
+			sed -i -e "s|^#\?co:.*$|$console_line|" \
+				/target/etc/inittab
+		else
+			sedexp="/^1:/i\\$console_line\\"
+			sed -i -e "$sedexp" /target/etc/inittab
+		fi
+	fi
+	if [ -f /target/etc/event.d/tty1 ]; then
+		log "adding console to /etc/event.d/tty1"
+		sed -e "s/^\(exec.*getty \).*/\1-L $console 9600 linux/" \
+		    -e "s/tty1/$console/g" \
+		    /target/etc/event.d/tty1 > /target/etc/event.d/$console
+	fi
+fi

Reply to: