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

Re: r55173 - in trunk/installer: build build/config debian



Frans Pop, le Sat 23 Aug 2008 09:19:06 +0200, a écrit :
> On Saturday 23 August 2008, Samuel Thibault wrote:
> > Author: sthibaul-guest
> > Date: Sat Aug 23 00:22:05 2008
> > New Revision: 55173
> >
> > Log:
> >   * Optionally add a beep to the x86 syslinux menu, controlled by
> > BOOTMENU_BEEP. This is enabled by default only for release builds.
> 
> With this patch (after fixing a syntax error) I'm hearing beeps *during*
> D-I image builds. I don't really like that...

Oops, sorry, I usually always disable the bell in my terms, so didn't
notice.  I guess since we are using GNU sed anyway, the patch below
would be fine?

> @@ -222,6 +239,7 @@
>                         INITRD_GTK /install/gtk/initrd.gz \
>                         VIDEO_MODE $(VIDEO_MODE) \
>                         VIDEO_MODE_GTK $(VIDEO_MODE_GTK) \
> +               | sed -e "$$addbeep" \
> 
> ... I also don't like that if BOOTMENU_BEEP != y we apparently execute
> 'sed -e ""'. It may work, but it's not pretty.

It sure works, an empty sed scripts does nothing...  I'm not quite happy
with that solution either, but the problem is that there is an ambiguity
issue between the spaces that separate the arguments and the space
within the sed script (which has to be preserved).  Another way would be
to set addbeep_cmd to "| sed -e" and use

$addbeep_cmd "$addbeep_arg"

to disambiguate the spaces.

Samuel

Index: build/config/x86.cfg
===================================================================
--- build/config/x86.cfg	(révision 55181)
+++ build/config/x86.cfg	(copie de travail)
@@ -61,7 +61,7 @@
 			fi; \
 		fi; \
 		if [ $$outfile = menu.cfg ] && [ "$$BOOTMENU_BEEP" = y ]; then \
-			addbeep="s/^menu title.*/&/"; \
+			addbeep="s/^menu title.*/&\\a/"; \
 		else \
 			addbeep=""; \
 		fi; \
@@ -164,7 +164,7 @@
 		fi; \
 		cat $(file); \
 		if [ $$outfile = menu.cfg ] && [ "$$BOOTMENU_BEEP" = y ]; then \
-			addbeep="s/^menu title.*/&/"; \
+			addbeep="s/^menu title.*/&\\a/"; \
 		else \
 			addbeep=""; \
 		fi \
@@ -226,7 +226,7 @@
 			outfile=isolinux.cfg; \
 		fi; \
 		if [ $$outfile = menu.cfg ] && [ "$$BOOTMENU_BEEP" = y ]; then \
-			addbeep="s/^menu title.*/&/"; \
+			addbeep="s/^menu title.*/&\\a/"; \
 		else \
 			addbeep=""; \
 		fi; \
@@ -285,7 +285,7 @@
 			outfile=$(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/pxelinux.cfg/default; \
 		fi; \
 		if [ $$outfile = menu.cfg ] && [ "$$BOOTMENU_BEEP" = y ]; then \
-			addbeep="s/^menu title.*/&/"; \
+			addbeep="s/^menu title.*/&\\a/"; \
 		else \
 			addbeep=""; \
 		fi; \

 


Reply to: