test-0045.sh 507 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 45
  4. # ------------------------------- Test 45 ------------------------------------
  5. # Test that prerotate and postrotate scripts are not called when sharedscripts
  6. # is defined and one rotation fails
  7. preptest test.log 45 1
  8. touch scriptout
  9. $RLR test-config.45 2>error.log
  10. grep "error: stat of" error.log >/dev/null
  11. if [ $? != 0 ]; then
  12. echo "No error printed, but there should be one."
  13. exit 3
  14. fi
  15. rm -f error.log
  16. checkoutput <<EOF
  17. test.log 0 zero
  18. scriptout 0
  19. EOF