Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Packaging question (editing crontab)

5 views
Skip to first unread message

hume.sp...@bofh.ca

unread,
Jan 6, 2010, 8:31:23 AM1/6/10
to
I'm building a package on Solaris 10 to install some shell-script utilities
(monitoring stuff) on some servers. Some of these utilities are fired out
of cron; I'd like the package to modify the monitoring user's crontab as
needed.

I've got this in my prototype:

i i.cron
i r.cron
e cron var/spool/cron/crontabs/nagios 0600 root sys

And both [ir].cron will add and remove (safely) the needed cron entries. It
works fine... IF the nagios crontab already exists. Even empty is okay.
But if the user HAS no crontab, I get the following on package install:

[ verifying class <cron> ]
ERROR: attribute verification of </var/spool/cron/crontabs/nagios> failed
pathname does not exist

Now, I can check for the file in checkinstall and install an empty cron
if needed, but I'm assuming there's a more elegant means of accomplishing
this.

--
Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/

jay

unread,
Jan 14, 2010, 10:17:48 AM1/14/10
to

hmmm. it's been a while since i last did that. so i'm not sure i
ever encountered
the exact same thing. i know i ran into something similar, and my fix
was to include
an empty crontab entry in the package.

j.

0 new messages