htb.init_find_fix.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. --- htb.init.old 2004-01-29 22:41:23.000000000 +0100
  2. +++ htb.init 2006-09-08 00:22:11.000000000 +0200
  3. @@ -468,8 +468,8 @@
  4. ### List of classes in $HTB_PATH
  5. htb_class_list () {
  6. for dev in `htb_device_list`; do
  7. - find $HTB_PATH \( -type f -or -type l \) \
  8. - -name "$dev-*" -not -name '*~' -maxdepth 1 \
  9. + find $HTB_PATH -maxdepth 1 \( -type f -or -type l \) \
  10. + -name "$dev-*" -not -name '*~' \
  11. -printf "%f\n"| sort
  12. done
  13. } # htb_class_list
  14. @@ -483,8 +483,8 @@
  15. ### Validate cache against config files
  16. htb_valid_cache () {
  17. for dev in `htb_device_list`; do
  18. - [ `find $HTB_PATH \( -type f -or -type l \) \
  19. - -name "$dev*" -maxdepth 1 -newer $HTB_CACHE| \
  20. + [ `find $HTB_PATH -maxdepth 1 \( -type f -or -type l \) \
  21. + -name "$dev*" -newer $HTB_CACHE| \
  22. wc -l` -gt 0 ] && VALID=0
  23. [ $VALID -ne 1 ] && break
  24. done
  25. @@ -493,7 +493,7 @@
  26. ### Find class config for device $1, which is newer than cache
  27. htb_cache_older () {
  28. - [ `find $HTB_PATH -type f -name "$1*" -maxdepth 1 \
  29. + [ `find $HTB_PATH -maxdepth 1 -type f -name "$1*" \
  30. -newer $HTB_CACHE| wc -l` -gt 0 ] && return 0
  31. return 1
  32. } # htb_cache_older