thanks for the patch.
You're welcome, as always, dear Martin :)
Anyway, I'm not sure if "getent" is available on all unix platforms.
> So IMO it's better to use the old script. Or knows anybody if "getent" > is also available on SunOS, FreeDSB, AIX, ...?
I implemented getent as a luxury feature and have no problems with hard coding the HOME, as I remember 'getent' to be 'lusers', f.e.
Another improvement is the use of 'find', which i believe to be available everywhere:
find $CRON_DIR ! -name *.dist ! -name *.rpm ! -path "*/CVS/*" -type f
Well, determining the necessary dirs/files to not go through was only a side effect, though: The main reason I worked on Cron.sh was the erraneous behaviour to determine the OTRS user stated on the command line. This would be this part:
-if test $CURRENTUSER = root; then
+if test "$CURRENTUSER" == 'root'; then
+ if test "$2" == ""; then
echo "Run this script just as OTRS user! Or use 'Cron.sh {start|stop|restart} OTRS_USER'!"
exit 5
+ else
+ su - $2 -c $0 $1
+ exit
+ fi
fi
Btw, I'm reworking the restore.sh script now, which does not work in the current state.
With kind regards,
Robert Kehl
_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
