On Wed, 2003-11-05 at 09:54, Jason Brechin wrote: > On Tue, 2003-11-04 at 16:42, Frank Crawford wrote: > > Jason, > > That is the output mailed to me from the run out of crontab when I took > > off the redirect to /dev/null. When I run it as root, outside of cron, > > it works fine. This is all for the version of sync_users in OSCAR 2.3 > > (sync_users-oscar-1.5-5). > > I'm willing to guess that it's due to c3 not handling the > non-interactive shell properly...
That's kind of the problem. Who's problem is it, opium (probably not really, it is just affected), c3 (yes, but they are assuming something about cron that works elsewhere) or crontab (ummm ...). > > > sync_users will check to see if it needs to change crontab, it does not > > > change it every time (IIRC). It will change it to what is in the config > > > file. If you want to change its run interval, change sync_users.conf, > > > not /etc/crontab. > > > > No, it rewrites it every time. This is the crontab update routine in > > the sync_users I've installed, which is always called as the last step > > in sync_users: > > Alright... you got me there... it does rewrite it every time. I haven't > looked at the code for quite a while. > > > You can see that every time it rewrites crontab, even if it is only with > > what was previously there. Worse, if you change the sync_users line, it > > puts it back to what it believes is the "correct one". > > This is intentional, since sync_users expects that it is managing the > cron line. I suppose I could add an option to prevent cron updates or > something, but that seems counter-productive. If you need to change the > crontab line you can always edit sync_users and sync_users.conf All I'd really see to do here is not to rewrite the file if there is no change. The rewrite also causes cron to reload the file, adding a (very small) extra overhead in everything. It also does open a small window where /etc/crontab could be corrupted, every 15 mins, when it isn't needed. However, the only change available in sync_users.conf is to change the timing. I wanted to remove the redirection, or following this, add a variable to set USER=$LOGNAME for the sync_users in /etc/crontab. The only place I can find the string defined is in sync_users itself. Is there some configuration option that allows me to change the full line from sync_users.conf? What I wanted is to enter: */15 * * * * root USER=$LOGNAME /opt/opium/bin/sync_users >/dev/null 2>&1 which, I think, is a valid workaround for the original problem. But I can't do this without changing sync_user, and as a bit of a purist (or just being pedantic) I'd prefer not to do. > Jason Frank -- ac3 Suite G16, Bay 7, Locomotive Workshop Phone: 02 9209 4600 Australian Technology Park Fax: 02 9209 4611 Eveleigh NSW 1430 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Oscar-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/oscar-users
