]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
kerberos_ldap_group/cert_tool: Remove ksh dependency
authorSantiago Garcia Mantinan <manty@debian.org>
Thu, 30 Oct 2014 15:00:59 +0000 (08:00 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 30 Oct 2014 15:00:59 +0000 (08:00 -0700)
Shell scripts published with Squid should be POSIX neutral. Replace the
ksh-specific syntax with portable POSIX shell.

helpers/external_acl/kerberos_ldap_group/cert_tool

index 9f14959bb6c9c0a5dd90e4787ff58ff08e0b010d..aeee2c98705dfde8697b411626870b263231e8dc 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/sh
 #
 #  -----------------------------------------------------------------------------
 # 
@@ -64,9 +64,9 @@ QUIT
 # 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