Shell scripts published with Squid should be POSIX neutral. Replace the
ksh-specific syntax with portable POSIX shell.
-#!/bin/ksh
+#!/bin/sh
#
## Copyright (C) 1996-2014 The Squid Software Foundation and contributors
##
# Create database for Sun ldap and pem file for Openldap
#
rm ${server}_[0-9]*.pem 2>/dev/null
-let i=0
- ls ${server}_[0-9]*.cert | while read file; do
- let i=i+1
+i=0
+ls ${server}_[0-9]*.cert | while read file; do
+ i=$(($i+1))
cat $file >> ${server}_$i.pem
CA=`openssl x509 -noout -text -in ${server}_$i.pem | grep -i "CA:.*true"`
if [ -n "$CA" ]; then