#!/bin/sh # Verify that tmpfiles skips an entry it does not support, and goes on # with the rest set -eu TEST_DIR=$(dirname "$0") DIR=/tmp/unsupported CONF=/tmp/unsupported.conf test_teardown() { say "Running test teardown." run "rm -rf $DIR $CONF" } # shellcheck source=/dev/null . "$TEST_DIR/lib/setup.sh" run "cat > $CONF" <&1") assert "The entry after is created" "$(texec ls $DIR)" = "after" assert "Each is reported once" "$(echo "$msg" | grep -c skipping)" -eq 2 say 'Remove and create, two passes' run "rm $DIR/after" msg=$(texec sh -c "/libexec/finit/tmpfiles --create --remove $CONF 2>&1") assert "The entry after is created" "$(texec ls $DIR)" = "after" assert "Each is reported once" "$(echo "$msg" | grep -c skipping)" -eq 2