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

Re: partial fix for ISOLINUX_DEFAULT



On Sat, Jan 03, 2009 at 07:41:10PM +0100, Frans Pop wrote:
> On Thursday 25 December 2008, Vagrant Cascadian wrote:
> > looking at debian-cd svn, i noticed that there was a FIXME for
> > supporting ISOLINUX_DEFAULT.
> >
> > this very imperfect patch at the very least gets installgui working
> > with the menus, to make Graphical Install the default menu selection,
> > although it relies on text.cfg getting loaded before gtk.cfg:
> 
> I'm not really happy with this patch.
> 
> 1) It's actual function seems extremely limited. Effectively it only moves 
> the default selection one line down.
> 2) It does not really support multi-arch nor multi-desktop CD/DVDs.
> 3) It only works because I expect isolinux will use the last 'default' 
> statement it encounters, but having two default statements in a config 
> seems rather ugly to me.

here's a patch that seems to addresses 2 (at least for i386+amd64) and 3.

i might be able to look into adding support for other architectures and using a
more generic variable name (GRAPHICAL_DEFAULT? GUI_DEFAULT?), but i don't have
the hardware to really test other arches. 

live well,
  vagrant

Index: tools/boot/lenny/boot-x86
===================================================================
--- tools/boot/lenny/boot-x86	(revision 1849)
+++ tools/boot/lenny/boot-x86	(working copy)
@@ -237,8 +239,23 @@
 	# FIXME - this is broken for the current setup which no longer
 	# has a 'default' statement in isolinux.cfg
 	if [ -n "$ISOLINUX_DEFAULT" ]; then
-		sed -i "s/^DEFAULT .*$/DEFAULT $ISOLINUX_DEFAULT/" \
-			boot$N/isolinux/isolinux.cfg
+		case $ISOLINUX_DEFAULT in
+			gtk) 
+				for txtcfg in $(ls boot$N/isolinux/txt.cfg boot$N/isolinux/amdtxt.cfg boot$N/isolinux/*/*txtdt.cfg) ; do
+					sed -i -e 's,menu default.*,,g' $txtcfg
+				done
+				for gtkcfg in $(ls boot$N/isolinux/gtk.cfg boot$N/isolinux/amdgtk.cfg boot$N/isolinux/*/*gtkdt.cfg) ; do
+					case $(basename $gtkcfg) in
+						amd*) 
+							echo "    menu default64" >> $gtkcfg
+							;;
+						*) 
+							echo "    menu default" >> $gtkcfg
+							;;
+					esac
+				done
+			;;
+		esac
 	fi
 
 	if [ -z "$MULTIARCH" ]; then


Reply to: