2006-11-28 04:23:22 +08:00
|
|
|
/*
|
2007-11-08 00:26:41 +08:00
|
|
|
* dhcpcd - DHCP client daemon
|
2007-11-06 23:03:38 +08:00
|
|
|
* Copyright 2006-2007 Roy Marples <roy@marples.name>
|
2007-05-11 00:08:49 +08:00
|
|
|
*
|
2007-11-08 00:26:41 +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
|
|
|
|
|
2007-07-18 19:26:59 +08:00
|
|
|
/* 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
|
|
|
|
|
2007-09-04 20:48:40 +08:00
|
|
|
/* 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-01-17 01:54:07 +08:00
|
|
|
|
2007-04-12 21:12:25 +08:00
|
|
|
#define NISFILE ETCDIR "/yp.conf"
|
2007-01-17 01:54:07 +08:00
|
|
|
|
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-01-17 01:54:07 +08:00
|
|
|
|
2007-04-12 21:12:25 +08:00
|
|
|
#define OPENNTPFILE ETCDIR "/ntpd.conf"
|
2007-04-03 15:03:04 +08:00
|
|
|
|
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
|
|
|
|
2007-11-14 20:53:21 +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
|
|
|
|
2007-11-16 07:58:16 +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
|
2007-11-10 04:48:51 +08:00
|
|
|
* SYSV should cover everthing else */
|
2007-11-16 07:58:16 +08:00
|
|
|
#ifdef ENABLE_OPENRC
|
|
|
|
# define SERVICE "OPENRC"
|
2007-11-10 04:48:51 +08:00
|
|
|
# define NISSERVICE ETCDIR "/init.d/ypbind"
|
|
|
|
# define NISRESTARTARGS "--nodeps", "--quiet", "conditionalrestart"
|
|
|
|
# define NTPSERVICE ETCDIR "/init.d/ntpd"
|
|
|
|
# define NTPRESTARTARGS "--nodeps", "--quiet", "conditionalrestart"
|
2007-11-16 07:58:16 +08:00
|
|
|
#elif ENABLE_BSDRC
|
|
|
|
# define SERVICE "BSDRC"
|
2007-11-10 04:48:51 +08:00
|
|
|
# define NISSERVICE ETCDIR "/rc.d/ypbind"
|
|
|
|
# define NISRESTARTARGS "restart"
|
|
|
|
# define NTPSERVICE ETCDIR "/rc.d/ntpd"
|
|
|
|
# define NTPRESTARTARGS "restart"
|
2007-11-16 07:58:16 +08:00
|
|
|
#elif ENABLE_SLACKRC
|
|
|
|
# define SERVICE "SLACKRC"
|
2007-11-10 04:48:51 +08:00
|
|
|
# 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
|
2007-11-10 04:48:51 +08:00
|
|
|
# undef ENABLE_NIS
|
|
|
|
# undef ENABLE_NTP
|
2007-11-08 18:37:52 +08:00
|
|
|
#endif
|
|
|
|
|
2006-11-28 04:23:22 +08:00
|
|
|
#endif
|