iPXE discussion forum
Suppress Screen output? - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Suppress Screen output? (/showthread.php?tid=5645)



Suppress Screen output? - MultimediaMan - 2012-09-23 09:47

I know how to do it in PHP, but is there any way to explicitly suppress any messages in an iPXE Script?

Example:

Code:
chain http://www.myplace.com/boot/ipxescript.ipxe

If the URL is bad we get something like:

Code:
http://www.myplace.com/boot/ipxescript.ipxe... no such file or directory (http://ipxe.org/2d0c613b)

I realize the error messages are for troubleshooting and debugging; but in the real world, we might not want to divulge a URL to the unwashed.

Best,

M^3


RE: Suppress Screen output? - Torgeir - 2012-09-23 16:13

Was curious about the same thing. But temporary I did something like this:

PHP Code:
~$ echo test sha1sum 
4e1243bd22c66e76c2ba9eddc1f91394e57f9f83 
(and used this as my filename).

On the server I did this: (I have a couple of camouflaged files).
PHP Code:
4e1243bd22c66e76c2ba9eddc1f91394e57f9f83.php
4e1243bd22c66e76c2ba9eddc1f91394e57f9f83
.masterfile 

I have a read input (username) that shows the url, thats the main reason I did this.

Torgeir


RE: Suppress Screen output? - Torgeir - 2012-10-15 13:24

Perhaps not quite what you was looking for. But this worked perfect for me.
http://www.mail-archive.com/ipxe-devel@lists.ipxe.org/msg01131.html

If you don't want to edit the file, here is a working copy of it:
http://pastebin.com/FNvWN7TP

Torgeir


RE: Suppress Screen output? - robinsmidsrod - 2012-10-15 16:02

@Torgeir: You might want to take notice of this reply later on in the thread: http://www.mail-archive.com/ipxe-devel@lists.ipxe.org/msg01155.html and the updated information for the set command which changes the syntax for a cls command slightly.

@MultimediaMan: I use this config in src/config/local/console.h to surpress a lot of console output and redirect it to syslog instead:

Code:
/* Everything but DEBUG and LOG output to BIOS console */
#undef CONSOLE_PCBIOS
#define CONSOLE_PCBIOS ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_DEBUG & ~CONSOLE_USAGE_LOG )

/* Everything but TUI output to syslog console */
#undef CONSOLE_SYSLOG
#define CONSOLE_SYSLOG ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_TUI )

#undef LOG_LEVEL
#define LOG_LEVEL LOG_ALL /* Full syslog logging */

You can read more about how to tweak the console and logging at http://ipxe.org/console.

It doesn't remove the URLs, but it does limit the amount of output you get on the actual console. If you only use native menus you might be able to get what you want by also removing STDOUT (and only keeping TUI) on the local console. That would make things difficult to debug, though.