 Issue 29761555:
  #8852 - ldap sync output filter  (Closed)
    
  
    Issue 29761555:
  #8852 - ldap sync output filter  (Closed) 
  | Left: | ||
| Right: | 
| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 #!/bin/sh | |
| 2 | |
| 3 # Filter out uninformative output lines from the ldap-sync cron job script | |
| 4 | |
| 5 last_action="" | |
| 6 | |
| 7 while read line; do | |
| 8 case "$line" in | |
| 9 *-\>*) | |
| 10 if [ ! -z "$last_action" ] | |
| 11 then | |
| 12 echo "$last_action" | |
| 13 fi | |
| 14 | |
| 15 echo "$line" | |
| 16 last_action="" | |
| 17 ;; | |
| 18 --\ Found\ *\ users* | \ | |
| 19 \#* | \ | |
| 20 *Synchronizing\ *\ groups* | \ | |
| 21 \*\*\ Synchronizing\ *\ users* | \ | |
| 22 --\ Updating\ user\ \'*\'?\(*\)* | \ | |
| 23 --\ Updating\ group\ \'*\'* | \ | |
| 24 --\ Creating\ user\ \'*\'?\(*\)* | \ | |
| 25 --\ Creating\ group\ \'*\'*) | |
| 26 last_action="$line" | |
| 27 ;; | |
| 28 *) | |
| 29 echo "$line" | |
| 30 ;; | |
| 31 esac | |
| 32 done | |
| OLD | NEW |