From: hume.spamfilter on
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/
From: jay on
On Jan 6, 7:31 am, hume.spamfil...(a)bofh.ca wrote:
> 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/

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.