"Paul Krizak" <[EMAIL PROTECTED]> writes:
> You could do something like:
>
> groups:
>     pgonedatabaseuser = ReturnsZero(/bin/sh -c
> ${dblquote}/usr/bin/whoami | grep -q pgonedatabaseuser${dblquote})
>     pganotherdatabaseuser = ReturnsZero(/bin/sh -c
> ${dblquote}/usr/bin/whoami | grep -q pganotherdatabaseuser${dblquote})

Ok, that's a bit less elegant than I was hoping for, but, with minor
tweaking, that works fine.

Tweaking...

groups:
   pginfo = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep pginfo")
   postgres = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep postgres")
   cbbrowne = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep cbbrowne")

This has the irritation that I have to predefine every user I could
possibly want to use, although I suppose that's no big deal in view
that I'd have to make a reference to it in order to use it...

Furthermore, it might be wiser to put on a prefix to suggest that
these are users, something like:

groups:
   userpginfo = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep pginfo")
   userpostgres = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep postgres")
   usercbbrowne = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep cbbrowne")

There is certainly some risk of having user names that are the same as
class names...
-- 
(reverse (concatenate 'string "ofni.sailifa.ac" "@" "enworbbc"))
<http://dba2.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to