/var/lib/pcp/testsuite/common.avahi is in pcp-testsuite 3.9.10.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #
# Common shell routines for testing Avahi service discovery
# Copyright (c) 2013-2014 Red Hat.
#
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
avahi_notrun_checks()
{
_get_libpcp_config
$service_discovery || _notrun "No support for service discovery"
# Is avahi-browse installed?
which avahi-browse >/dev/null 2>&1 || _notrun avahi-browse is not installed
# Is the avahi-daemon installed and running? (maybe /sbin or /usr/sbin)
avahi-daemon --check 2>/dev/null || _notrun avahi-daemon is not available
}
avahi_cleanup()
{
cd $here
$sudo $signal -a "$service" >/dev/null 2>&1
rm -f $tmp.*
}
avahi_service()
{
$sudo "$PCP_RC_DIR/$service" restart > $seq.full 2>&1
}
avahi_verify()
{
echo "Verify $service avahi service advertising"
hostname=`hostname`
avahi-browse -rt -d local "_$service._tcp" | \
tee -a $seq.full | \
grep -m1 "hostname = .$hostname" | \
sed -e "s/$hostname/HOSTNAME/g"
}
|