2005-12-07 21:49:09 +00:00
|
|
|
#!/bin/sh
|
2005-12-17 19:22:04 +00:00
|
|
|
# network device, change as appropriate
|
2006-07-15 22:25:23 +00:00
|
|
|
if ping -c 4 www.debian.org >/dev/null 2>&1; then
|
2005-12-07 21:49:09 +00:00
|
|
|
echo "--resource=network"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if msgfmt -V > /dev/null 2>&1; then
|
|
|
|
|
echo "--resource=msgfmt"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
os=`python -c "import os; print os.name"`
|
|
|
|
|
if [ "x$os" = "xposix" ]; then
|
|
|
|
|
echo "--resource=posix"
|
|
|
|
|
fi
|
2008-05-20 08:57:37 +00:00
|
|
|
|
|
|
|
|
SOCK=`grep LocalSocket /etc/clamav/clamd.conf | awk '{print $2;}'`
|
|
|
|
|
if test -n $SOCK; then
|
|
|
|
|
if waitfor -w 1 unix:"$SOCK"; then
|
|
|
|
|
echo "--resource=clamav"
|
|
|
|
|
fi
|
|
|
|
|
fi
|