]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
kerberos_ldap_group/cert_tool: Remove ksh dependency
authorSantiago Garcia Mantinan <manty@debian.org>
Sun, 19 Oct 2014 03:27:07 +0000 (20:27 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 19 Oct 2014 03:27:07 +0000 (20:27 -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 e67637ef6148ab3878948a297d7858f489610bf2..a8def1fd1ea97b264062f4b93fdaff55aea9c9be 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/sh
 #
 ## Copyright (C) 1996-2014 The Squid Software Foundation and contributors
 ##
@@ -70,9 +70,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