dhcpcd/config.h

107 lines
3.4 KiB
C
Raw Normal View History

2006-11-28 04:23:22 +08:00
/*
* dhcpcd - DHCP client daemon
* Copyright 2006-2007 Roy Marples <roy@marples.name>
2007-05-11 00:08:49 +08:00
*
* Distributed under the terms of the GNU General Public License v2
2006-11-28 04:23:22 +08:00
*/
2007-05-11 00:08:49 +08:00
#ifndef CONFIG_H
#define CONFIG_H
/* You can enable/disable various chunks of optional code here.
* You would only do this to try and shrink the end binary if dhcpcd
* was running on a low memory device */
#define ENABLE_ARP
#define ENABLE_NTP
#define ENABLE_NIS
#define ENABLE_INFO
/* Define this to enable some compatability with 1.x and 2.x info files */
// #define ENABLE_INFO_COMPAT
/* IPV4LL, aka ZeroConf, aka APIPA, aka RFC 3927.
* Needs ARP. */
#define ENABLE_IPV4LL
2007-05-11 00:08:49 +08:00
/* We will auto create a DUID_LLT file if it doesn't exist.
* You can always create your own DUID file that just contains the
* hex string that represents the DUID.
* See RFC 3315 for details on this. */
#define ENABLE_DUID
2007-11-08 18:37:52 +08:00
/* resolvconf is framework for multiple interfaces to manage resolv.conf */
#define ENABLE_RESOLVCONF
/* Some systems do not have a working fork.
* The Makefile will attempt to work it out, but if it fails to feel free to
* define it here. */
// #define THERE_IS_NO_FORK
2007-11-08 18:37:52 +08:00
/* Packname name and pathname definitions. */
2006-11-28 04:23:22 +08:00
2007-04-12 21:12:25 +08:00
#define PACKAGE "dhcpcd"
2006-11-28 04:23:22 +08:00
2007-04-12 21:12:25 +08:00
#define ETCDIR "/etc"
#define RESOLVFILE ETCDIR "/resolv.conf"
2007-04-12 21:12:25 +08:00
#define NISFILE ETCDIR "/yp.conf"
2007-04-12 21:12:25 +08:00
#define NTPFILE ETCDIR "/ntp.conf"
#define NTPDRIFTFILE ETCDIR "/ntp.drift"
#define NTPLOGFILE "/var/log/ntp.log"
2007-04-12 21:12:25 +08:00
#define OPENNTPFILE ETCDIR "/ntpd.conf"
2007-04-12 21:12:25 +08:00
#define DEFAULT_SCRIPT ETCDIR "/" PACKAGE ".sh"
2006-11-28 04:23:22 +08:00
2007-04-12 21:12:25 +08:00
#define STATEDIR "/var"
#define PIDFILE STATEDIR "/run/" PACKAGE "-%s.pid"
2006-11-28 04:23:22 +08:00
#ifndef INFODIR
# define INFODIR "/var/lib/dhcpcd"
#endif
#define INFOFILE INFODIR "/" PACKAGE "-%s.info"
#define DUIDFILE INFODIR "/" PACKAGE ".duid"
2007-05-11 00:08:49 +08:00
/* OPENRC is Open Run Control, forked from Gentoo's baselayout package
* BSDRC is BSD style Run Control
* SLACKRC is Slackware Run Control
* SERVICE is RedHat service command
* SYSV should cover everthing else */
#ifdef ENABLE_OPENRC
# define SERVICE "OPENRC"
# define NISSERVICE ETCDIR "/init.d/ypbind"
# define NISRESTARTARGS "--nodeps", "--quiet", "conditionalrestart"
# define NTPSERVICE ETCDIR "/init.d/ntpd"
# define NTPRESTARTARGS "--nodeps", "--quiet", "conditionalrestart"
#elif ENABLE_BSDRC
# define SERVICE "BSDRC"
# define NISSERVICE ETCDIR "/rc.d/ypbind"
# define NISRESTARTARGS "restart"
# define NTPSERVICE ETCDIR "/rc.d/ntpd"
# define NTPRESTARTARGS "restart"
#elif ENABLE_SLACKRC
# define SERVICE "SLACKRC"
# define NISSERVICE ETCDIR "/rc.d/rc.ypbind"
# define NISRESTARTARGS "restart"
# define NTPSERVICE ETCDIR "/rc.d/rc.ntpd"
# define NTPRESTARTARGS "restart"
#elif ENABLE_SERVICE
# define SERVICE "SERVICE"
# define NISSERVICE "service"
# define NISRESTARTARGS "ypbind", "restart"
# define NTPSERVICE "service"
# define NTPRESTARTARGS "ntpd", "restart"
#elif ENABLE_SYSV
# define SERVICE "SYSV"
# define NISSERVICE ETCDIR "/init.d/ypbind"
# define NISRESTARTARGS "restart"
# define NTPSERVICE ETCDIR "/init.d/ntpd"
# define NTPRESTARTARGS "restart"
2007-11-08 18:37:52 +08:00
#else
# undef ENABLE_NIS
# undef ENABLE_NTP
2007-11-08 18:37:52 +08:00
#endif
2006-11-28 04:23:22 +08:00
#endif