Commit dbb43e86 authored by Marco Mariani's avatar Marco Mariani

zmcbpolicydinit: removed hardcoded checks for zimbra user;

changed permission +x;
call convert-tsql with /bin/sh
parent 9d20dffb
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
source `dirname $0`/../bin/zmshutil || exit 1 source `dirname $0`/../bin/zmshutil || exit 1
zmsetvars \ zmsetvars \
...@@ -55,7 +56,7 @@ initCBPolicyd() { ...@@ -55,7 +56,7 @@ initCBPolicyd() {
fi fi
echo -n "Converting policyd database templates to sqlite..." echo -n "Converting policyd database templates to sqlite..."
for i in core.tsql access_control.tsql quotas.tsql checkhelo.tsql checkspf.tsql greylisting.tsql; do for i in core.tsql access_control.tsql quotas.tsql checkhelo.tsql checkspf.tsql greylisting.tsql; do
${cbpolicyDir}/share/database/convert-tsql sqlite ${cbpolicyDir}/share/database/$i | sed -e '/^#/d' sh ${cbpolicyDir}/share/database/convert-tsql sqlite ${cbpolicyDir}/share/database/$i | sed -e '/^#/d'
done > ${dbfile}.sq3 done > ${dbfile}.sq3
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "failed." echo "failed."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment