aboutsummaryrefslogtreecommitdiff
path: root/etc/periodic/weekly/300.uucp
diff options
context:
space:
mode:
Diffstat (limited to 'etc/periodic/weekly/300.uucp')
-rwxr-xr-xetc/periodic/weekly/300.uucp17
1 files changed, 15 insertions, 2 deletions
diff --git a/etc/periodic/weekly/300.uucp b/etc/periodic/weekly/300.uucp
index 3370158805ad..1d146bc05cba 100755
--- a/etc/periodic/weekly/300.uucp
+++ b/etc/periodic/weekly/300.uucp
@@ -15,11 +15,24 @@ fi
case "$weekly_uucp_enable" in
[Yy][Ee][Ss])
- if [ -d /var/spool/uucp -a -f /usr/libexec/uucp/clean.weekly ]
+ if [ ! -d /var/spool/uucp ]
then
+ echo '$weekly_uucp_enable is set but /var/spool/uucp' \
+ "doesn't exist"
+ rc=2
+ elif [ ! -x /usr/libexec/uucp/clean.weekly ]
+ then
+ echo '$weekly_uucp_enable is set but' \
+ "/usr/libexec/uucp/clean.weekly isn't executable"
+ rc=2
+ else
echo ""
echo "Cleaning up UUCP:"
- echo /usr/libexec/uucp/clean.weekly | su daemon
+ echo /usr/libexec/uucp/clean.weekly | su -m daemon && rc=0 || rc=3
fi;;
+
+ *) rc=0;;
esac
+
+exit $rc