Print this page
XXX Remove nawk(1)
*** 972,982 ****
EGREP="/usr/bin/egrep"
GREP="/usr/bin/grep"
DEBUG=0 # Set Debug OFF
BACKUP=no_ldap # backup suffix
HOST="" # NULL or <hostname>
! NAWK="/usr/bin/nawk"
RM="/usr/bin/rm"
WC="/usr/bin/wc"
CAT="/usr/bin/cat"
SED="/usr/bin/sed"
MV="/usr/bin/mv"
--- 972,982 ----
EGREP="/usr/bin/egrep"
GREP="/usr/bin/grep"
DEBUG=0 # Set Debug OFF
BACKUP=no_ldap # backup suffix
HOST="" # NULL or <hostname>
! AWK="/usr/xpg4/bin/awk"
RM="/usr/bin/rm"
WC="/usr/bin/wc"
CAT="/usr/bin/cat"
SED="/usr/bin/sed"
MV="/usr/bin/mv"
*** 1422,1435 ****
}
get_krb_realm() {
# To upper cases
! LDAP_KRB_REALM=`${ECHO} ${LDAP_DOMAIN} | ${NAWK} '{ print toupper($0) }'`
get_ans_req "Enter Kerberos Realm:" "$LDAP_KRB_REALM"
# To upper cases
! LDAP_KRB_REALM=`${ECHO} ${ANS} | ${NAWK} '{ print toupper($0) }'`
}
# $1: DN
# $2: ldif file
add_entry_by_DN() {
--- 1422,1435 ----
}
get_krb_realm() {
# To upper cases
! LDAP_KRB_REALM=`${ECHO} ${LDAP_DOMAIN} | ${AWK} '{ print toupper($0) }'`
get_ans_req "Enter Kerberos Realm:" "$LDAP_KRB_REALM"
# To upper cases
! LDAP_KRB_REALM=`${ECHO} ${ANS} | ${AWK} '{ print toupper($0) }'`
}
# $1: DN
# $2: ldif file
add_entry_by_DN() {
*** 5061,5071 ****
# We need to remove proxy agent's read access to user passwords,
# but We do not know the value of the ${LDAP_PROXYAGENT} here, so
# 1. if only one match found, delete it
# 2. if more than one matches found, ask the user which one to delete
! HOWMANY=`${WC} -l ${TMPDIR}/grep_proxyread_aci | ${NAWK} '{print $1}'`
if [ $HOWMANY -eq 0 ]; then
${ECHO} "Proxy ACI ${PROXY_ACI_NAME} does not exist for ${LDAP_BASEDN}."
return 0
fi
if [ $HOWMANY -eq 1 ];then
--- 5061,5071 ----
# We need to remove proxy agent's read access to user passwords,
# but We do not know the value of the ${LDAP_PROXYAGENT} here, so
# 1. if only one match found, delete it
# 2. if more than one matches found, ask the user which one to delete
! HOWMANY=`${WC} -l ${TMPDIR}/grep_proxyread_aci | ${AWK} '{print $1}'`
if [ $HOWMANY -eq 0 ]; then
${ECHO} "Proxy ACI ${PROXY_ACI_NAME} does not exist for ${LDAP_BASEDN}."
return 0
fi
if [ $HOWMANY -eq 1 ];then
*** 5085,5095 ****
${SED} -e "s/.*ldap:\/\/\/.*ldap:\/\/\///" \
${TMPDIR}/grep_proxyread_aci | ${SED} -e "s/\";)//" > \
${TMPDIR}/proxy_agent_list
# print the proxy agent list
! ${NAWK} '{print NR ": " $0}' ${TMPDIR}/proxy_agent_list
# ask the user to pick one
_MENU_PROMPT="Select the proxy agent (1-$HOWMANY): "
get_menu_choice "${_MENU_PROMPT}" "0" "$HOWMANY"
_CH=$MN_CH
--- 5085,5095 ----
${SED} -e "s/.*ldap:\/\/\/.*ldap:\/\/\///" \
${TMPDIR}/grep_proxyread_aci | ${SED} -e "s/\";)//" > \
${TMPDIR}/proxy_agent_list
# print the proxy agent list
! ${AWK} '{print NR ": " $0}' ${TMPDIR}/proxy_agent_list
# ask the user to pick one
_MENU_PROMPT="Select the proxy agent (1-$HOWMANY): "
get_menu_choice "${_MENU_PROMPT}" "0" "$HOWMANY"
_CH=$MN_CH