Cron jobs

New features which should be implemented in Porteus Kiosk Edition and the kiosk wizard.
User avatar
fanthom
Site Admin
Site Admin
Posts: 4586
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Cron jobs

Post#16 by fanthom » 11 Sep 2013, 16:17

In my Kiosk iso the /boot/syslinux dir is not exist, so I made it with chmod +x .
nope. you should replace kiosk's /boot/vmlinuz with /boot/syslinux/vmlinuz from standard edition
Please add [Solved] to your thread title if the solution was found.

sanzi
White ninja
White ninja
Posts: 29
Joined: 04 Sep 2013, 12:02
Distribution: Porteus Kiosk
Location: Hungary

Re: Cron jobs

Post#17 by sanzi » 11 Sep 2013, 19:30

Sorry for my bad english. I wanted to write this:
In /boot was not /syslinux dir, so I created it. I put the wmlinuz here, so in /boot/syslinux . Then I change the warrant of new dir (syslinux) to executable with chmod +x /boot/syslinux . This is correct or I mess something?

sanzi
White ninja
White ninja
Posts: 29
Joined: 04 Sep 2013, 12:02
Distribution: Porteus Kiosk
Location: Hungary

Re: Cron jobs

Post#18 by sanzi » 12 Sep 2013, 08:48

So sorry, I know what you wanted to write me. I overwrite the Kiosk wmlinuz file with the Desktop wmlinuz file. The directory not change. The result: nothing happend on the right time...

Update: I wait while you create the new version with this funkcion. Until I use this code to poweroff every day:

Code: Select all

#!/bin/sh

(

    min=$(echo $((59-`date +%M`)))
    hr=$(echo $(echo $((15-`date +%H`)))*60)
    mins_total=$(echo $(($min+$hr)))
    sleep "$mins_total"m 2>/dev/null && poweroff || exit

) &

User avatar
fanthom
Site Admin
Site Admin
Posts: 4586
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Cron jobs

Post#19 by fanthom » 12 Sep 2013, 16:10

I wait while you create the new version with this funkcion.
we are not moving with features planned for next kiosk version (printing support and web version of the wizard) at all so this may be a long wait...

my bet is that you are booting with original kiosk kernel and not the swapped one.
please boot to text mode and run these two commands manually (make sure you dont miss any character):

Code: Select all

echo $(date +%s -d "+ 2 minutes") > /sys/class/rtc/rtc0/wakealarm
echo mem >/sys/power/state
let me know if you get any errors.
Please add [Solved] to your thread title if the solution was found.

sanzi
White ninja
White ninja
Posts: 29
Joined: 04 Sep 2013, 12:02
Distribution: Porteus Kiosk
Location: Hungary

Re: Cron jobs

Post#20 by sanzi » 12 Sep 2013, 20:50

Code: Select all

echo $(date +%s -d "+ 2 minutes") > /sys/class/rtc/rtc0/wakealarm
date: invalid date ' +2 minutes '

Code: Select all

echo mem >/sys/power/state
echo: write error: No such device

I try get some information:

Code: Select all

cat /sys/power/state
freeze disk

Code: Select all

echo $(date +%s) > /sys/class/rtc/rtc0/wakealarm
cat /sys/class/rtc/rtc0/wakealarm
Nothing...

User avatar
fanthom
Site Admin
Site Admin
Posts: 4586
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Cron jobs

Post#21 by fanthom » 12 Sep 2013, 23:49

weird - looks like your PC does not support suspend. do you have 'mem' listed when you boot porteus standard edition on this PC?
we have no other choice then to stick to 'freeze' power state so please edit my script and replace:

Code: Select all

echo mem >/sys/power/state
with

Code: Select all

echo freeze >/sys/power/state
this error is more important:

Code: Select all

date: invalid date ' +2 minutes '
looks like busybox's 'date' applet does not understand this (bit weird) command syntax. please copy 'date' utility from 32bit standard edition to /rootcopy/opt/porteus-scripts folder and then edit my script as follows:

Code: Select all

echo `/opt/porteus-scripts/date '+%s' -d "+ 15 hours"` > /sys/class/rtc/rtc0/wakealarm
this way you'll be using 'date' from /rootcopy and not one shipped with busybox.

hopefully everything will be ok now.
Please add [Solved] to your thread title if the solution was found.

sanzi
White ninja
White ninja
Posts: 29
Joined: 04 Sep 2013, 12:02
Distribution: Porteus Kiosk
Location: Hungary

Re: Cron jobs

Post#22 by sanzi » 13 Sep 2013, 06:24

I will try it, thanks!

But when I try this code on the same PC with Porteus Desktop Live boot from CD, everything is OK.

Code: Select all

echo $(date +%s -d "+ 2 minutes") > /sys/class/rtc/rtc0/wakealarm
echo mem >/sys/power/state
do you have 'mem' listed when you boot porteus standard edition on this PC?
Yes, I have, and I try it, it work's!

Code: Select all

cat /sys/power/state
freeze standby mem disk

Post Reply