Browse Source

Add option to turn off calendar via env variables settable via cron.

Ie: ``CALENDAR=0'' will turn it off which is useful for machines with
no local users that do not run YP.
OPENBSD_2_1
millert 28 years ago
parent
commit
ad8ea0fcfd
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      src/etc/daily

+ 8
- 3
src/etc/daily View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: daily,v 1.17 1997/01/17 06:18:19 millert Exp $
# $OpenBSD: daily,v 1.18 1997/02/19 16:49:18 millert Exp $
# From: @(#)daily 8.2 (Berkeley) 1/25/94 # From: @(#)daily 8.2 (Berkeley) 1/25/94
# #
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
@ -110,8 +110,13 @@ fi
} }
echo "" echo ""
if [ -d /var/yp/binding -a ! -d /var/yp/`domainname` ]; then
echo "Not running calendar, (yp client)."
if [ -d /var/yp/binding -a ! -d /var/yp/`domainname` -o "X$CALENDAR" = X0 ]
then
if [ "X$CALENDAR" = X0 ]; then
echo "Not running calendar, (disabled)."
else
echo "Not running calendar, (yp client)."
fi
else else
echo "Running calendar." echo "Running calendar."
calendar -a calendar -a


Loading…
Cancel
Save