bsdinstall - disable debug

I have bsdinstall scripts I use to setup a complete running system and I've wondered for a long time how to stop it from printing all the debug output to the console?

I have tried setting debug in my script:
Code:
debug=0
debug=NO
unset debug


Each iteration by itself did not change anything.
 
Thanks - so, if I provide -D <file> all output will be redirected to that?

/usr/libexec/bsdconfig/USAGE
OPTIONS:
-d Provide lots of debugging info on standard-out when running.
-D file Send debugging info to file. If file begins with a plus-sign
debug info is sent to both standard-out and file (minus the
leading plus).
 
I just tried -D /tmp/bsdinstall.log and debugFile=/tmp/bsdinstall.log.

While output is written there, it is also written to stdout :(. I guess I can redirect stdout to /dev/null, but was hoping for a cleaner way.
 
Thanks - so, if I provide -D <file> all output will be redirected to that?

/usr/libexec/bsdconfig/USAGE

No, that's for bsdconfig(8), not bsdinstall. The two are related and share some code but are not the same.

bsdconfig -D somefile generates lots of logging to somefile, but nothing to stdout.
 
Oh, ok, that explains why it wrote to the file, but also continued to write to stdout. Hmm, I need to dig more through /usr/share/bsdconfig, /usr/libexec/bsdconfig, /usr/libexec/bsdinstall.
 
I just tried -D /tmp/bsdinstall.log and debugFile=/tmp/bsdinstall.log.

Where did you get 'debugFile' from? The default logfile is /tmp/bsdinstall_log, default path in $BSDINSTALL_LOG

While output is written there, it is also written to stdout :(. I guess I can redirect stdout to /dev/null, but was hoping for a cleaner way.

Nothing 'unclean' about "somecommand >/dev/null"

Can you show the whole command you used? Which target/s? Example script/s?

Unless you're actually using bsdconfig, just concentrate on bsdinstall, I suggest.
 
Ok, I will give it a go in the morning. I have wrapper scripts which call bsdinstall with a generated script.
 
Upon invoking

bsdinstall script.custom installscript

debug is set to 1, so at the beginning of my script.custom, I unset debug and poof, no more debug messages :). I will have to dig more in bsdinstall as to why it is setting debug to 1.

In addition, I'd like to hide the dialogs, so I tried this subsequently, to no avail:
no_confirm=1
USE_DIALOG=0

The dialogs are still shown, it is an improvement over what I had, but still not where I want to be.
 
Back
Top