mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
ffa328f060
"! test ..." does not cause the script to fail, even with set -e. IIUC, bash treats this command as part of an expression line, as it would if 'test ... && ...' was used. Failing expression lines do not terminate the script. This fixes the obvious cases by changing '! test' → 'test !'. Then the inversion happens internally in test and bash will propagate the failure.
14 lines
250 B
Bash
Executable File
14 lines
250 B
Bash
Executable File
#! /bin/bash
|
|
#
|
|
# With "e" don't attempt to set permissions when file doesn't exist, see
|
|
# https://github.com/systemd/systemd/pull/6682.
|
|
#
|
|
|
|
set -e
|
|
|
|
rm -fr /tmp/test
|
|
|
|
echo "e /tmp/test - root root 1d" | systemd-tmpfiles --create -
|
|
|
|
test ! -e /tmp/test
|