Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: wysiwyg on October 26, 2016, 12:27:34 PM
-
Good afternoon all, I've noticed several problems with the 'at' scheduler in both the Intel 32 and 64 bit extensions. First, both require the flex.tcz dependency. Secondly we need to add some additional lines to the /usr/local/tce.installed/atd file:
...snip...
if [ ! -d /var/at/atjobs ]; then
mkdir -p /var/at/atjobs
chown root:staff /var/at/atjobs
chmod 775 /var/at/atjobs
fi
if [ ! -d /var/at/atspool ]; then
mkdir -p /var/at/atspool
chown root:staff /var/at/atspool
chmod 775 /var/at/atspool
fi
if [ ! -e /var/at/atjobs/.SEQ ]; then
touch /var/at/atjobs/.SEQ
chown root:staff /var/at/atjobs/.SEQ
chmod 660 /var/at/atjobs/.SEQ
fi
...snip...
There is also a missing /usr/local/etc/init.d/atd script:
#!/bin/sh
case $1 in
start) atd ;;
stop) kill $(pidof atd) ;;
restart)
$0 stop
$0 start
;;
*) echo "Usage $0: {start|stop|restart} ;;
esac
Lastly, even with these changes I still can't seem to have scheduled tasks run. I'm getting an error "Can't signal atd (permission denied)", but have no clue why. Any thoughts?
Thanks,
Dave
[EDIT]: Added code tags. Rich
-
Update: starting atd with your user account makes everything work as designed, but this will not work in a multi-user system. I've tried to start the daemon like:
su nobody -s /bin/sh -c /usr/local/sbin/atd
but it will not start...
Dave
-
@juanito what account was used to run the software with during compilation? Is there a compile script that I can download?
Thanks,
Dave
-
@juanito what account was used to run the software with during compilation? Is there a compile script that I can download?
Or more precisely, what account and group did you list in the configure script? By default it uses 'daemon' for both, which is not a valid account in TC.
Dave
-
Like these compile scripts?
http://tinycorelinux.net/7.x/x86/tcz/src/at/compile_at
http://tinycorelinux.net/7.x/x86_64/tcz/src/at/compile_at
-
Thanks Misalf, that was exactly what I was looking for! It also shows that the user and group accounts used for the extension is root - which explains some things. :)
Thanks again,
Dave
-
@juanito After talking with the Debian team to get this working, it appears that you must setuid the 'at' binary (chmod 6755 at) and run the 'atd' daemon as the root user (since that's how it was compiled). Let me know if you need me to make any of these changes.
Dave
-
I'll look at it in a few days time
-
Sounds good, thanks juanito
-
modified extensions posted
-
Hey juanito, thanks for updating the package! Unfortunately there still seems to be some issues with it. I had a typo in the provided init.d script:
*) echo "Usage $0: {start|stop|restart} ;;
should include a trailing " character:
*) echo "Usage $0: {start|stop|restart}" ;;
Also, there appears to be some weird characters in that script and /usr/local/tce.installed/at. If you 'cat /usr/local/etc/init.d/at' script you can see what I'm talking about - it prevents execution. Lastly, shouldn't that script actually be called 'atd' instead of 'at' to match the daemon? Trivial change, but just thought I'd mention it. :)
Thanks,
Dave
-
'not sure what happened there :o
extensions re-posted