From 836416330b2874523ce1a740d36c06332d43b8c3 Mon Sep 17 00:00:00 2001 From: millert Date: Wed, 19 Feb 1997 16:49:18 +0000 Subject: [PATCH] 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. --- etc/daily | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/daily b/etc/daily index 115ddc4b8b1..ddd351a6176 100644 --- a/etc/daily +++ b/etc/daily @@ -1,6 +1,6 @@ #!/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 # PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin @@ -110,8 +110,13 @@ fi } 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 echo "Running calendar." calendar -a -- 2.20.1