WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: wifi.tcz info file  (Read 1783 times)

Offline parky_dw

  • Newbie
  • *
  • Posts: 33
wifi.tcz info file
« on: February 19, 2017, 04:50:27 PM »
Having just successfully installed wifi.tcz on Tiny Core 7.2 I was trying to get it to auto start - with no success.  The info file says add:
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log
to bootlocal.sh.  Didn't work for me.  An empty /tmp/wifi.log file appeared (owned by root, group root) and nothing was started.  Having spent some hours going round in circles I found sticking an explicit sudo at the  front of the line fixed it (as you do if you type it in later as user tc).  Strange.  I thought it was already running as root, and if it wasn't why didn't the checkroot() error message appear in the log file?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: wifi.tcz info file
« Reply #1 on: February 20, 2017, 07:25:13 AM »
I think that redirect is wrong, 2>&1 needs to come after "> /tmp/wifi.log" for stderr to go there.
The only barriers that can stop you are the ones you create yourself.

Offline parky_dw

  • Newbie
  • *
  • Posts: 33
Re: wifi.tcz info file
« Reply #2 on: February 20, 2017, 02:05:44 PM »
You're right.  Evaluation is left to right: send stdout to file, send stderr to wherever stdout is going.  With them the other way round something breaks.  If I reverse them everything works as it should without any need for sudo.  So info file should read:
/usr/local/bin/wifi.sh -a > /tmp/wifi.log 2>&1
Thanks
David