• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

WiFi Unreliable When Booting Into Maintenance Mode

Okay, so here's my s99logcap:
Code:
#!/bin/sh

BHTMP=$(mktemp -dp /mod/tmp "$(date +"%m%d%H%M").XXX")
for f in /mod/tmp/prev/* ; do
  [ -f "$f" ] && mv "/mod/tmp/prev/$f" "$BHTMP/"
done
...but although it creates temp folders, they're empty and the files are still in /mod/tmp/prev.
 
Okay, so here's my s99logcap:
...
...but although it creates temp folders, they're empty and the files are still in /mod/tmp/prev.
s@"/mod/tmp/prev/$f"@"$f"@ ?

Why is that a do loop and not a simple one-off wild-card move command?

To avoid trying to copy anything that isn't a "regular" file, such as subdirectories?
 
Why is that a do loop and not a simple one-off wild-card move command?
Because if there if nothing there it gives you an error (which is bad style). And -f doesn't support more than one name.
s@"/mod/tmp/prev/$f"@"$f"@ ?
Oops.
To avoid trying to copy anything that isn't a "regular" file, such as subdirectories?
Maybe -e would have been better, but it hardly matters in this context as there aren't likely to be any.
 
s@"/mod/tmp/prev/$f"@"$f"@ ?
I get you. I should have been able to work that out, but tend to go a bit symbol-blind!

So, if anyone wants it, create /mod/etc/init.d/s99logcap (and make executable) to preserve the logs into a separate folder per run, at normal boot. The logs are those captured into /mod/tmp/prev during a Maintenance Mode run by the script in post 35. The purpose is to debug connection to a WiFi network during a MM boot.
Code:
#!/bin/sh

BHTMP=$(mktemp -dp /mod/tmp "$(date +"%m%d%H%M").XXXXXX")
for f in /mod/tmp/prev/* ; do
  [ -f "$f" ] && mv "$f" "$BHTMP/"
done

I don't know why I have coreutils installed, but clearly some people might not and therefore the instance of mktemp they run will come from busybox, hence the 6 X's (but I've not tested it with the busybox version).
 
Last edited:
I haven't had a single connection failure since making the modifications. What's the best way for me to ensure a clean slate to test the wireless-helper beta?
 
Back
Top