#!/bin/sh
# http://refspecs.freestandards.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/pkgformat.html
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg
select distinct pkgid from rpm_files where fileflag & 580 = 0 and filemode & 61440 = 16384 and (filename glob '/var/run/*' or filename glob '/var/lock/*');
EOSQL
for i in `cat $REPOCOP_TEST_TMPDIR/msg`; do repocop-test-info -k $i "Found a subdir in /var/run or /var/lock. /var/run and /var/lock may be mounted as temporary filesystems, so the init.d scripts must handle this correctly. This will typically amount to creating any required subdirectories dynamically when the init.d script is run, rather than including them in the package and relying on rpm to create them."; done
rm $REPOCOP_TEST_TMPDIR/*
