Meike Stone writes:
2012/11/23 Meike Stone <meike.stone@googlemail.com>:
But now, I try to start the job from a crontab in cron.d, /etc/cron.daily , /etc/cron.hourly, /etc/cron.monthly, /etc/cron.weekly.
Sorry, I only mean /etc/cron.d. And this is called from the cron istself and not /usr/lib/cron/run-crons. My mistake. And therefore in each file must
SHELL=/bin/bash BASH_ENV=/etc/profile.d/my-enc.sh
included ...
I understand, but I'm not so lucky about that.
The problem is: We don't know enough about your use case. And, frankly, I don't want to know it exactly. We're entering the realm of consultancy, hand helding as FSF calls it, beyond helping fellow chaps on open source mailing lists. Usually, my company gets money for that... ;-) Your use case is not clearly articulated. Do you need the full range of env vars and other settings in your cron jobs? Or do you need just some few settings, e.g., to establish DB communication. (E.g., DB2 is famous for needing $DBINSTANCE or similar.) This leads to very different solution strategies. How many files in cron.d does one have? How often do they change? What change processes, what deployment automation (puppet, chef, et.al.) are in place at one's site? Maybe $BASH_ENV is a solution; maybe it's better to set env vars during service start as needed. This is very much situation dependent, and that's what a good Ops team is about. If you aren't charged to be Ops (and, for your sake, I hope you aren't), get in contact with them and talk about your problems. Hopefully they can put some process in this trial-and-error situation. Btw, any strategy you choose must take into account openSUSE's package management, too, for security reasons. Thus, a strategy for sysinitv might be different than a strategy for systemd. It's hard to tell in general terms if it's better to change crontab/cron.d files or systemd/sysinitv startup files to set env vars as needed, if one doesn't know which env vars, and for which services. Cheers, Joachim PS: I won't answer further for specific techical problems of the issue at hand, AFAICS, we're beyond that point. I'm open for discussion about general Ops or DevOps problems concerning openSUSE usage in commercial environments, as my company is concerned about that issuue. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org