iPXE discussion forum

Full Version: Suppress Screen output?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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
Perhaps not quite what you was looking for. But this worked perfect for me.
http://www.mail-archive.com/ipxe-devel@l...01131.html

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

Torgeir
@Torgeir: You might want to take notice of this reply later on in the thread: http://www.mail-archive.com/ipxe-devel@l...01155.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.
Reference URL's