Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suppress Screen output?
2012-09-23, 09:47
Post: #1
Suppress Screen output?
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

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2012-09-23, 16:13 (This post was last modified: 2012-09-23 16:13 by Torgeir.)
Post: #2
RE: Suppress Screen output?
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
Find all posts by this user
Quote this message in a reply
2012-10-15, 13:24
Post: #3
RE: Suppress Screen output?
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
Find all posts by this user
Quote this message in a reply
2012-10-15, 16:02
Post: #4
RE: Suppress Screen output?
@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.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)