1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. if [ -d "/bin" ];then
  3. COUNT=$(find -L /bin -type f -perm /022 -exec ls -l {} \; |wc -l)
  4. if [ $COUNT -eq 0 ];then
  5. :
  6. else
  7. exit 1
  8. fi
  9. fi
  10. if [ -d "/usr/bin" ];then
  11. COUNT=$(find -L /usr/bin -type f -perm /022 -exec ls -l {} \; |wc -l)
  12. if [ $COUNT -eq 0 ];then
  13. :
  14. else
  15. exit 1
  16. fi
  17. fi
  18. if [ -d "/usr/local/bin" ];then
  19. COUNT=$(find -L /usr/local/bin -type f -perm /022 -exec ls -l {} \; |wc -l)
  20. if [ $COUNT -eq 0 ];then
  21. :
  22. else
  23. exit 1
  24. fi
  25. fi
  26. if [ -d "/sbin" ];then
  27. COUNT=$(find -L /sbin -type f -perm /022 -exec ls -l {} \; |wc -l)
  28. if [ $COUNT -eq 0 ];then
  29. :
  30. else
  31. exit 1
  32. fi
  33. fi
  34. if [ -d "/usr/sbin" ];then
  35. COUNT=$(find -L /usr/sbin -type f -perm /022 -exec ls -l {} \; |wc -l)
  36. if [ $COUNT -eq 0 ];then
  37. :
  38. else
  39. exit 1
  40. fi
  41. fi
  42. if [ -d "/usr/local/sbin" ];then
  43. COUNT=$(find -L /usr/local/sbin -type f -perm /022 -exec ls -l {} \; |wc -l)
  44. if [ $COUNT -eq 0 ];then
  45. :
  46. else
  47. exit 1
  48. fi
  49. fi