(arrgh. the server ate my cookie and then my post! Second write-up.)

I've looked into my SBC since the latest firmware gives me confidence
this thing is going somewhere. 
The SBC has an ssh server, a root account, a cron daemon (unused) and
no "at" command. So as gharris999 suggested it is possible to ask the
SBC to schedule sending wol packets to wake a server at a predetermined
time.
I didn't search a lot, but found about no documentation on the SBC's
OS. This is how I see things.

- Avoiding RTC clock sync problems: we rely on the RTC clock of the
server and the one of the SBC. If they're out of synch, their
definition of, say, "1228007549" will not match properly. 2 solutions I
think, I don't know what's best:
a) use relative time: the server asks the SBC for a wakeup call in,
say, 10800 seconds. Then the SBC translates this to its RTC reference
time. Requires some (simple) processing on the SBC side.
b) check for synchronicity: the server could execute "date", ssh to the
SBC and remotely execute "date", and execute "date" upon return. Then
check the SBC's date is between the other 2. Or not too far. Then
adjust its wake-up date accordingly and send a skewed date to the SBC.
[motivation: Normally the clocks should be synchronized, most servers
run ntp and the SBC uses the time service I think. But appliances which
lack an RTC clock battery boot on jan-1st-1970 until they've
synchronized over the net. Does the SBC have an RTC battery ?]

- Programming the wake-up call itself: the hardcore unix way, or the
plugin/applet way ?
a) Hardcore. The following can work, provided keys are installed for
passwordless ssh login from the server into the SBC (not a very user
friendly install procedure, IMO): i. the server determines its wake-up
date (adjusted, cf. supra), ii. it logs into the SBC and executes a
crontab update, iii. checks crond is running, iv. logs out and go to
sleep.
b) Plugin/applet communication. I don't know this, but I guess that
would be much nicer to program, maintain, and install would be easier.
Can an applet do stuff as root on the OS, or are they sandboxed ?

That's the state of my musings. I'll be happy to learn from others.

Mhh. Now I will press on this "Submit reply" button again. See you on
the frontpage, hopefully.


-- 
epoch1970
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to