--libexecdir) LIBEXECDIR=$var;;
--statedir|--localstatedir) STATEDIR=$var;;
--dbdir) DBDIR=$var;;
- --rundir|--runstatedir) RUNDIR=$var;;
+ --rundir) RUNDIR=$var;;
+ --runstatedir) RUNSTATEDIR=$var;;
--mandir) MANDIR=$var;;
--datadir) DATADIR=$var;;
--with-ccopts|CFLAGS) CFLAGS=$var;;
: ${LIBEXECDIR:=$PREFIX/libexec}
: ${STATEDIR:=/var}
: ${DBDIR:=$STATEDIR/db/dhcpcd}
-: ${RUNDIR:=$STATEDIR/run}
+: ${RUNSTATEDIR:=$STATEDIR/run}
+: ${RUNDIR:=$RUNSTATEDIR/dhcpcd}
: ${MANDIR:=${PREFIX:-/usr}/share/man}
: ${DATADIR:=${PREFIX:-/usr}/share}
echo "DHCPCD_SRCS+= ipv4ll.c" >>$CONFIG_MK
fi
fi
-if [ -z "$INET6" -o "$INET6" = yes ]; then
+if [ -z "$INET6" ] || [ "$INET6" = yes ]; then
echo "Enabling INET6 support"
echo "CPPFLAGS+= -DINET6" >>$CONFIG_MK
echo "DHCPCD_SRCS+= ipv6.c ipv6nd.c" >>$CONFIG_MK
# define LEASEFILE6 LEASEFILE "6"
#endif
#ifndef PIDFILE
-# define PIDFILE RUNDIR "/" PACKAGE "%s%s%s.pid"
+# define PIDFILE RUNDIR "/%s%s%spid"
#endif
#ifndef CONTROLSOCKET
-# define CONTROLSOCKET RUNDIR "/" PACKAGE "%s%s.sock"
+# define CONTROLSOCKET RUNDIR "/%s%ssock"
#endif
#ifndef UNPRIVSOCKET
-# define UNPRIVSOCKET RUNDIR "/" PACKAGE ".unpriv.sock"
+# define UNPRIVSOCKET RUNDIR "/unpriv.sock"
#endif
#ifndef RDM_MONOFILE
# define RDM_MONOFILE DBDIR "/rdm_monotonic"
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 9, 2019
+.Dd November 28, 2019
.Dt DHCPCD 8
.Os
.Sh NAME
Stores the monotonic counter used in the
.Ar replay
field in Authentication Options.
-.It Pa @RUNDIR@/dhcpcd.pid
+.It Pa @RUNDIR@/pid
Stores the PID of
.Nm
running on all interfaces.
-.It Pa @RUNDIR@/dhcpcd\- Ns Ar interface Ns .pid
+.It Pa @RUNDIR@/ Ns Ar interface Ns .pid
Stores the PID of
.Nm
running on the
.Ar interface .
-.It Pa @RUNDIR@/dhcpcd.sock
+.It Pa @RUNDIR@/sock
Control socket to the master daemon.
-.It Pa @RUNDIR@/dhcpcd.unpriv.sock
+.It Pa @RUNDIR@/unpriv.sock
Unprivileged socket to the master daemon, only allows state retrieval.
-.It Pa @RUNDIR@/dhcpcd\- Ns Ar interface Ns .sock
+.It Pa @RUNDIR@/ Ns Ar interface Ns .sock
Control socket to per interface daemon.
.El
.Sh SEE ALSO
#endif
#ifdef INET
ctx.udp_fd = -1;
+#endif
+#ifdef INET6
+ ctx.nd_fd = -1;
+#endif
+#ifdef DHCP6
+ ctx.dhcp6_fd = -1;
#endif
rt_init(&ctx);
per = "";
}
snprintf(ctx.pidfile, sizeof(ctx.pidfile),
- PIDFILE, "-", ifname, per);
+ PIDFILE, ifname, per, ".");
} else {
snprintf(ctx.pidfile, sizeof(ctx.pidfile),
PIDFILE, "", "", "");
if ((pid = pidfile_lock(ctx.pidfile)) != 0) {
if (pid == -1)
- logerr("%s: pidfile_lock", __func__);
+ logerr("%s: pidfile_lock: %s",
+ __func__, ctx.pidfile);
else
logerrx(PACKAGE
" already running on pid %d (%s)",