-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LNX.2.00.1305121613100.31424@Telcontar.valinor> El 2013-05-12 a las 12:26 +0200, Julien Michielsen escribió: You replied to me in private. I asume this is just a simple mistake because you are not used to these lists, so I'm replying back to the mail list.
Carlos E. R. schreef op 2013-05-11 19:05:
On Saturday, 2013-05-11 at 16:00 +0200, Julien Michielsen wrote:
Considering on Linux terms I do not really know what to do, I will not try to do this. What I did do is making a two-character alias (jd), which runs my juldaily script (runs my backup and sets my clock properly). Typing these two characters does everything I want to be done, and is easy enough for me.
You really need do nothing, it is automatic, your backup script will eventually run automatically, but not at the time you thought. You can improve things: Edit the file "/etc/sysconfig/cron", these two entries: DAILY_TIME="22:10" MAX_NOT_RUN="1" The firt line chooses a preferred time for the job to run. The second one means that if a day has passed without running (because the computer was off at that time) it will run within 15 minutes of booting or restoring. So, it ends by running once every day. Now, you say your clock is wrong at boot time, and that you run a script that sets your clock right. Ok, This can also be automated. Simply create a script in "/etc/pm/sleep.d/" and it will run at the correct time. For example, I have this script named "1cosas" (there can be several scripts, the number in front is for choosing which one runs first): +++·········································· #!/bin/bash . /usr/lib/pm-utils/functions NUM=1 DATE=`date --rfc-3339=seconds` case "$1" in hibernate) /bin/logger -t pm-utils -p syslog.warn "Hibernating ($NUM)..." echo "$DATE - hibernating the system now" >> /var/log/eventlog ;; suspend) /bin/logger -t pm-utils -p syslog.warn "Suspending ($NUM)..." echo "$DATE - suspending the system now" >> /var/log/eventlog ;; thaw) /bin/logger -t pm-utils -p syslog.warn "Thawing ($NUM)..." echo "$DATE - thawing the system now" >> /var/log/eventlog ;; resume) /bin/logger -t pm-utils -p syslog.warn "Resuming ($NUM)..." echo "$DATE - resuming the system now" >> /var/log/eventlog ;; *) ;; esac exit $? ··········································++- This script does nothing important, just writes an entry to syslog when the system is changing state, and another entry to a file: 2013-03-15 15:50:32+01:00 - Booting the system now ================================================================================ Linux Telcontar 3.1.10-1.19-desktop #1 SMP PREEMPT Mon Feb 25 10:32:50 UTC 2013 (f0b13a3) x86_64 x86_64 x86_64 GNU/Linux 2013-03-16 02:51:16+01:00 - hibernating the system now 2013-03-16 13:02:22+01:00 - thawing the system now 2013-03-16 18:51:58+01:00 - hibernating the system now so that I know when my computer was booted (that's another script) or hibernated or restored. In your case, you simply have to do whatever you do to restore your clock, write it in the correct section of the script. In fact, there is a file at "/usr/lib/pm-utils/sleep.d/90clock" that attempts it, perhaps it is failing in your case. Or, looking at it contents, you need setting the variable "NEED_CLOCK_SYNC" to true.. Try editing the file "/usr/lib/pm-utils/defaults", there is this section: +++·········································· # If you need to synchronize the system clock across a suspend/resume or # hibernate/thaw cycle, set this variable. # NEED_CLOCK_SYNC="true" ··········································++- remove the '#' in front of the variable. If that does not work, I still have more amunition ;-) - -- Saludos Carlos E. R. (desde 12.1 x86_64 "Asparagus" en Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAlGPqucACgkQtTMYHG2NR9VyRwCfVe3sydty2iVIG+78VjgC+XWu BaAAn0bDB7kOjbZ9DUJzYB5pzQamboKK =f6fE -----END PGP SIGNATURE-----