Notices


Reply
Thread Tools
santiago's Avatar
Posts: 518 | Thanked: 334 times | Joined on Mar 2010 @ italy
#1
Hi, i made a simple script that uses openntpd and syncs time and date in one click. It tests the active connection using WGET and then syncs time and date in your phone. Some dbus messages will inform you about the process during the sync. I made 2 debs one for the italian people, one for the english people

it depends by: wget, openntpd and rootsh

first of all make sure that you have rootsh installed, you gotta run this in the xterm console

Code:
apt-get update
apt-get install wget openntpd
download the file and install it or via xterm using dpkg -i time-sync.deb or opening it with the package manager

*** It's not a gui it a simple bash script with a nice icon
Attached Files
File Type: deb time-sync-English.deb (6.9 KB, 259 views)
File Type: deb time-sync-italian.deb (7.0 KB, 111 views)

Last edited by santiago; 2011-04-15 at 20:49. Reason: correcting the pack
 

The Following 3 Users Say Thank You to santiago For This Useful Post:
Posts: 110 | Thanked: 127 times | Joined on May 2010
#2
When not receiving a cellular signal, the clock can behave strangely, so it's cool that a synch tool exists.

More generally, I wish ntpd could kick in when no cell signal is available. Ideally it would be an option integrated into the phone's initial set-date-and-time dialogues... but I can't imagine anyone making that kind of effort.
 
santiago's Avatar
Posts: 518 | Thanked: 334 times | Joined on Mar 2010 @ italy
#3
yes this syncs just when you are connected to one network. Sometimes i reflash or i plug off the battery then i need to have a nice app to sync in one click my date and time. I think it's a little bit impossible to sync with no one connection.. Maybe using GPS data? I can't think how..
 
Posts: 21 | Thanked: 14 times | Joined on Feb 2011
#4
After installing with X-terminal I got the next error:

(Reading database ... 31297 files and directories currently installed.)
Preparing to replace date-time-syncronizer 1.0 (using time-sync-English.deb) ...
Unpacking replacement date-time-syncronizer ...
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--install):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer

Whats going wrong?
 
santiago's Avatar
Posts: 518 | Thanked: 334 times | Joined on Mar 2010 @ italy
#5
Originally Posted by Kershaw View Post
After installing with X-terminal I got the next error:

(Reading database ... 31297 files and directories currently installed.)
Preparing to replace date-time-syncronizer 1.0 (using time-sync-English.deb) ...
Unpacking replacement date-time-syncronizer ...
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--install):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer

Whats going wrong?
Sorry for waiting..
Did you install dependencies?

I Need to see all the output error. You pasted just some lines. Open a New Xterminal and execute all that you see here

Code:
root
apt-get install wget openntpd
then you gotta cd to the path where you left the deb example:

cd /where/the/deb/is/left

and you will execute

Code:
dpkg -i date-time*.deb
if you don't install dependencies you can't use it becouse you gotta have Wget and Openntpd to get it working. Wget tests the connection and Openntpd syncs time and date in your device with an online service.
 
Posts: 21 | Thanked: 14 times | Joined on Feb 2011
#6
My first post is the output of the commands you suppose.
Can advance clock plugin cause the error.
 
santiago's Avatar
Posts: 518 | Thanked: 334 times | Joined on Mar 2010 @ italy
#7
Originally Posted by Kershaw View Post
My first post is the output of the commands you suppose.
Can advance clock plugin cause the error.
If i write

dpkg -i i will see dpkg -i etc etc.. U posted half output code i can't resolve it if you don't post what im asking for.
Paste all the code from root to the end of the error output code. I don't have troubles with the advanced clock plugin.
 
Posts: 21 | Thanked: 14 times | Joined on Feb 2011
#8
Excuse me, here is the full log.
~ $ root


BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N900:~# apt-get install wget openntpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
wget is already the newest version.
openntpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--configure):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nokia-N900:~# cd /home/user/
Nokia-N900:/home/user# cd /home/user/MyDocs/
Nokia-N900:/home/user/MyDocs# dpkg -i time-sync-English.deb
(Reading database ... 31297 files and directories currently installed.)
Preparing to replace date-time-syncronizer 1.0 (using time-sync-English.deb) ...
Unpacking replacement date-time-syncronizer ...
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--install):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer

Also open with the application manager gives an error.
 
santiago's Avatar
Posts: 518 | Thanked: 334 times | Joined on Mar 2010 @ italy
#9
Originally Posted by Kershaw View Post
Excuse me, here is the full log.
~ $ root


BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N900:~# apt-get install wget openntpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
wget is already the newest version.
openntpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--configure):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nokia-N900:~# cd /home/user/
Nokia-N900:/home/user# cd /home/user/MyDocs/
Nokia-N900:/home/user/MyDocs# dpkg -i time-sync-English.deb
(Reading database ... 31297 files and directories currently installed.)
Preparing to replace date-time-syncronizer 1.0 (using time-sync-English.deb) ...
Unpacking replacement date-time-syncronizer ...
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--install):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer

Also open with the application manager gives an error.
try the italian an tell me if it works. thanks for waiting give me a couple of minutes becouse i'm making something with my n900

one more thing: can u see the link in the menu?
if yes, can u try to run it ?

try also with dpkg --configure -a

Last edited by santiago; 2011-04-20 at 19:09.
 
Posts: 21 | Thanked: 14 times | Joined on Feb 2011
#10
I tries both:

The link gives the error:
Can't update 'date time synchronizer'
Also when I open the .deb file he shows that the file is 0 kb

This is the output of the italian:


BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ root


BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N900:~# apt-get update
Hit http://repository.maemo.org fremantle-1.3 Release.gpg
Ign http://repository.maemo.org fremantle-1.3/free Translation-nl
Ign http://repository.maemo.org fremantle-1.3/non-free Translation-nl
Hit http://repository.maemo.org fremantle Release.gpg
Hit https://downloads.maemo.nokia.com ./ Release.gpg
Ign http://repository.maemo.org fremantle/free Translation-nl
Ign http://repository.maemo.org fremantle/non-free Translation-nl
Hit http://repository.maemo.org fremantle Release.gpg
Ign http://repository.maemo.org fremantle/free Translation-nl
Ign http://repository.maemo.org fremantle/non-free Translation-nl
Hit http://repository.maemo.org fremantle Release.gpg
Ign http://repository.maemo.org fremantle/free Translation-nl
Ign https://downloads.maemo.nokia.com ./ Translation-nl
Ign http://repository.maemo.org fremantle/non-free Translation-nl
Hit http://repository.maemo.org fremantle-1.3 Release
Hit https://downloads.maemo.nokia.com ./ Release.gpg
Hit http://repository.maemo.org fremantle Release
Hit http://repository.maemo.org fremantle Release
Hit http://repository.maemo.org fremantle Release
Ign https://downloads.maemo.nokia.com ./ Translation-nl
Ign http://repository.maemo.org fremantle-1.3/free Packages/DiffIndex
Hit https://downloads.maemo.nokia.com ./ Release.gpg
Ign http://repository.maemo.org fremantle-1.3/non-free Packages/DiffIndex
Ign http://repository.maemo.org fremantle/free Packages/DiffIndex
Ign http://repository.maemo.org fremantle/non-free Packages/DiffIndex
Ign http://repository.maemo.org fremantle/free Packages/DiffIndex
Ign http://repository.maemo.org fremantle/non-free Packages/DiffIndex
Hit http://repository.maemo.org fremantle-1.3/free Packages
Hit http://repository.maemo.org fremantle-1.3/non-free Packages
Ign https://downloads.maemo.nokia.com ./ Translation-nl
Hit http://repository.maemo.org fremantle/free Packages
Hit http://repository.maemo.org fremantle/non-free Packages
Hit https://downloads.maemo.nokia.com ./ Release
Hit http://repository.maemo.org fremantle/free Packages
Hit https://downloads.maemo.nokia.com ./ Release
Hit https://downloads.maemo.nokia.com ./ Release
Hit http://repository.maemo.org fremantle/non-free Packages
Ign http://repository.maemo.org fremantle/free Packages/DiffIndex
Ign http://repository.maemo.org fremantle/non-free Packages/DiffIndex
Ign https://downloads.maemo.nokia.com ./ Packages/DiffIndex
Hit http://repository.maemo.org fremantle/free Packages
Hit http://repository.maemo.org fremantle/non-free Packages
Ign https://downloads.maemo.nokia.com ./ Packages/DiffIndex
Ign https://downloads.maemo.nokia.com ./ Packages/DiffIndex
Hit https://downloads.maemo.nokia.com ./ Packages
Hit https://downloads.maemo.nokia.com ./ Packages
Hit https://downloads.maemo.nokia.com ./ Packages
Reading package lists... Done
Nokia-N900:~# apt-get install wget openntpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
wget is already the newest version.
openntpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--configure):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nokia-N900:~# cd /home/user/MyDocs
Nokia-N900:/home/user/MyDocs# dpkg -i time-sync-italian.deb
(Reading database ... 31297 files and directories currently installed.)
Preparing to replace date-time-syncronizer 1.0 (using time-sync-italian.deb) ...
Unpacking replacement date-time-syncronizer ...
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--install):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer
Nokia-N900:/home/user/MyDocs# dpkg --configure -a
Setting up date-time-syncronizer (1.0) ...
dpkg: error processing date-time-syncronizer (--configure):
subprocess post-installation script returned error exit status 141
Errors were encountered while processing:
date-time-syncronizer
Nokia-N900:/home/user/MyDocs#
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 09:11.