Programming and Scripting :: simple script to set system clock
it looks like telnet needs sudo too;
... sudo telnet time.nist.gov 13 > nistTime.txt vFound=$(cat nistTime.txt | grep "UTC(NIST)") if [ ! -z "$vFound" ]; then vDateTime=${vFound:9:2}${vFound:12:2}${vFound:15:2}${vFound:18:2}"20"${vFound:6:2}"."${vFound:21:2} date -u time1=`date +%s` sudo date -u "$vDateTime" time2=`date +%s` timediff=`expr $time2 - $time1` date echo corrected by "$timediff" seconds fi
P.S/ umm,, how do you update this to the fluxbox toolbar ?If your commands are in a script, you can simply run the script as sudo rather than adding multiple sudo commands to the script.
If fluxbox is not automatically updating, just restart it. You don't need to restart x if this is done from the Fluxbox confguration submenu, so you won't lose your open applications. I think it will update itself if you wait a bit, but i'm not sure about that.
If your script is run from bootlocal (assuming your network is set up automatically), both issues should be handled already.quite right mikshaw. easy way to force the fluxbox update is to right-click near it so the menu covers it, then left-click on empty space. Hmmmmm.... interesting..... I don't have to do an sudo telnet.
The machine I wrote this for has a frugal install of DSL version 2.2 I'm not sure why I don't need an 'sudo telnet'
Quote (newOldUser @ Feb. 21 2007,07:33)
I'm not sure why I don't need an 'sudo telnet'
maybe you don't. just that whenever i don't use sudo, the telnet just hangs there..(?)Next Page...
original here.