|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T c
Length: 5267 (0x1493)
Types: TextFile
Names: »config.h«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦653021b30⟧ »EurOpenD3/utils/downtime.tar.Z«
└─⟦946c717da⟧
└─⟦this⟧ »config.h«
/*
* Copyright (c) 1988 Michael A. Cooper, University of Southern California.
* This program may be used, copied, modified, and redistributed freely
* for noncommercial purposes, so long as this notice remains intact.
*/
/*
* $Header: config.h,v 4.1 88/07/05 17:49:13 mcooper Exp $
*------------------------------------------------------------------
*
* $Source: /usr/skat3/src/common/usc/etc/downtime/RCS/config.h,v $
* $Revision: 4.1 $
* $Date: 88/07/05 17:49:13 $
* $State: Exp $
*
*------------------------------------------------------------------
*
* Michael A. Cooper
* Research and Development Group
* University Computing Services
* University of Southern California
* (mcooper@oberon.USC.EDU)
*
*------------------------------------------------------------------
* $Log: config.h,v $
* Revision 4.1 88/07/05 17:49:13 mcooper
* Commented RPCWALL situation.
*
* Revision 4.0 88/07/05 15:54:26 mcooper
* Initial version.
*
*------------------------------------------------------------------
*/
#ifndef __CONFIG__
#define __CONFIG__
#include "dttime.h"
/*
* Define RPCWALL if you wish to do remote broadcast messages via RPC.
* There is currently some Sun proprietary code involved in this.
* If you have a file called rpc.c (which contains most of the RPC
* specific routines), then you should define RPCWALL. If you don't
* have rpc.c, then defining RPCWALL will prevent downtime from
* compiling successfully.
*/
#if defined(sun) || defined(vax)
/*
* Let's be fancy with a local hack <osversion.h>.
*/
# include <osversion.h> /* OS Version info */
# if defined(sun) || (defined(vax) && OSVERSION >= 43)
# define RPCWALL /* Do RPC WALL broadcasts */
# endif
#endif
/*
* Define NEW_SYSLOG if we have the new 4.3bsd syslog.
*/
#if (defined(BSD) && BSD >= 43) || (defined(sun) && defined(OSVERSION) && \
OSVERSION >= 40)
#define NEW_SYSLOG
#endif
#define VERSION 4 /* What version are we at? */
#define ROOT 0 /* The Stupid User */
#define MAXENTRIES 100 /* max number of DT entries */
#define MAXHELP 30 /* max number help key words */
#define WARNTIME (8 HOURS) /* When we start warning */
#define MOTDTIME (2 WEEKS) /* When we add msg to motd */
#define COMMENT '#' /* A comment character */
#define EMPTY "(EMPTY)" /* No reason specified */
#define PROMPT "DownTime> " /* Interactive prompt */
#define NOW "Immediately"
#define REBOOT "/etc/reboot" /* Program to reboot system */
#define HALT "/etc/halt" /* Program to halt system */
#define PAGER "/usr/ucb/more" /* A file pager */
#define UTMP "/etc/utmp" /* User tmp file */
#ifndef DEBUG
#define RMTAB "/etc/rmtab" /* NFS remote mtab */
#define NOLOGIN "/etc/nologin" /* Turn off login's */
#define DATAFILE "/etc/downtime.df" /* Data file */
#define LOCKFILE "/etc/downtime.df.LOCK" /* Lockfile for DataFile */
#define CFFILE "/etc/downtime.cf" /* Configuration File */
#define HELPFILE "/usr/public/etc/downtime.hf" /* Help file */
#define TMPFILE "/etc/dt_tmpXXXXXX" /* Temp. data file */
#define LOGFILE "/usr/adm/shutdownlog" /* Std log file for shutdown */
#define DTLOG "/usr/adm/downtime.log" /* Log file for cmds */
#define MOTD "/etc/motd" /* Message of the day file */
#define FASTBOOT "/fastboot" /* Signify fast boot */
#else
#define RMTAB "rmtab"
#define NOLOGIN "nologin"
#define DATAFILE "downtime.df"
#define LOCKFILE "downtime.df.LOCK"
#define HELPFILE "downtime.hf"
#define CFFILE "downtime.cf"
#define TMPFILE "dt_tmpXXXXXX"
#define LOGFILE "shutdownlog"
#define DTLOG "downtime.log"
#define MOTD "motd"
#define FASTBOOT "fastboot"
#endif
#define LOCKRETRIES 5 /* Number of retries on LF */
#define STRSIZE BUFSIZ /* For Ccmd buffers */
/*
* Insure we know the max host name length
*/
#ifndef MAXHOSTNAMELEN
# define MAXHOSTNAMELEN 64
#endif MAXHOSTNAMELEN
#define YES 1
#define NO 0
#define ON 1
#define OFF 0
/*
* Insure we know what truth is.
*/
#ifdef TRUE
# undef TRUE
#endif TRUE
#define TRUE 1
#ifdef FALSE
# undef FALSE
#endif FALSE
#define FALSE 0
/*
* ways of using mkdate()
*/
#define D_DATE 0
#define D_VERBOSE 1
#define D_LOGFILE 2
#define D_CCMD 3
#define D_MOTD 4
#define D_SHORTSHUT 5
#define D_TIME 6
/*
* Used by dtlock()
*/
#define L_LOCK 1
#define L_UNLOCK 2
#define debug (verbose >= 10)
#define dprintf if (debug) printf
#define is_time(x) ((x[0] == '+') ||\
(index(x, ':') != NULL) ||\
(strcmp(x, "now") == 0))
#define is_date(x) (index(x, '/') != NULL)
#endif /* __CONFIG__ */