File: test-0045.sh

package info (click to toggle)
logrotate 3.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,152 kB
  • sloc: sh: 6,666; ansic: 5,245; makefile: 161
file content (26 lines) | stat: -rwxr-xr-x 515 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

. ./test-common.sh

cleanup 45

# ------------------------------- Test 45 ------------------------------------
# Test that prerotate and postrotate scripts are not called when sharedscripts
# is defined and one rotation fails
preptest test.log 45 1

touch scriptout
$RLR test-config.45 2>error.log && exit 23

grep "error: stat of" error.log >/dev/null
if [ $? != 0 ]; then
	echo "No error printed, but there should be one."
	exit 3
fi

rm -f error.log

checkoutput <<EOF
test.log 0 zero
scriptout 0
EOF