From 34d507072dcdea09e9e3e31f980d0d0e754d99db Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Sun, 7 Feb 2021 13:08:10 -0800 Subject: [PATCH] dhcp: add basic logging functionality vlogger should properly set tag and facility identically to logger if you don't set anything special so it shoud be entirely safe to simply exec straight into vlogger without explicitly setting those flags. Fixes #25558 --- srcpkgs/dhcp/files/dhclient/log/run | 1 + srcpkgs/dhcp/files/dhclient/run | 1 + srcpkgs/dhcp/files/dhcpd4/log/run | 1 + srcpkgs/dhcp/files/dhcpd4/run | 1 + srcpkgs/dhcp/files/dhcpd6/log/run | 1 + srcpkgs/dhcp/files/dhcpd6/run | 1 + srcpkgs/dhcp/template | 2 +- 7 files changed, 7 insertions(+), 1 deletion(-) create mode 120000 srcpkgs/dhcp/files/dhclient/log/run create mode 120000 srcpkgs/dhcp/files/dhcpd4/log/run create mode 120000 srcpkgs/dhcp/files/dhcpd6/log/run diff --git a/srcpkgs/dhcp/files/dhclient/log/run b/srcpkgs/dhcp/files/dhclient/log/run new file mode 120000 index 00000000000..3a5b4a58605 --- /dev/null +++ b/srcpkgs/dhcp/files/dhclient/log/run @@ -0,0 +1 @@ +/usr/bin/vlogger \ No newline at end of file diff --git a/srcpkgs/dhcp/files/dhclient/run b/srcpkgs/dhcp/files/dhclient/run index 5cb45f19cf5..19b924ab3c2 100644 --- a/srcpkgs/dhcp/files/dhclient/run +++ b/srcpkgs/dhcp/files/dhclient/run @@ -1,3 +1,4 @@ #!/bin/sh +exec 2>&1 [ -r conf ] && . ./conf exec dhclient ${OPTS:=-d} diff --git a/srcpkgs/dhcp/files/dhcpd4/log/run b/srcpkgs/dhcp/files/dhcpd4/log/run new file mode 120000 index 00000000000..3a5b4a58605 --- /dev/null +++ b/srcpkgs/dhcp/files/dhcpd4/log/run @@ -0,0 +1 @@ +/usr/bin/vlogger \ No newline at end of file diff --git a/srcpkgs/dhcp/files/dhcpd4/run b/srcpkgs/dhcp/files/dhcpd4/run index 05d9f9b726e..423d87cc70d 100644 --- a/srcpkgs/dhcp/files/dhcpd4/run +++ b/srcpkgs/dhcp/files/dhcpd4/run @@ -1,4 +1,5 @@ #!/bin/sh +exec 2>&1 [ -r conf ] && . ./conf touch /var/lib/dhcp/dhcpd.leases exec dhcpd -f ${OPTS:=-4 -q -pf /run/dhcpd4.pid} diff --git a/srcpkgs/dhcp/files/dhcpd6/log/run b/srcpkgs/dhcp/files/dhcpd6/log/run new file mode 120000 index 00000000000..3a5b4a58605 --- /dev/null +++ b/srcpkgs/dhcp/files/dhcpd6/log/run @@ -0,0 +1 @@ +/usr/bin/vlogger \ No newline at end of file diff --git a/srcpkgs/dhcp/files/dhcpd6/run b/srcpkgs/dhcp/files/dhcpd6/run index 2dc26f33221..57b86926acb 100644 --- a/srcpkgs/dhcp/files/dhcpd6/run +++ b/srcpkgs/dhcp/files/dhcpd6/run @@ -1,4 +1,5 @@ #!/bin/sh +exec 2>&1 [ -r conf ] && . ./conf touch /var/lib/dhcp/dhcpd.leases exec dhcpd -f ${OPTS:=-6 -q -pf /run/dhcpd6.pid} diff --git a/srcpkgs/dhcp/template b/srcpkgs/dhcp/template index 1b6f7de5b6c..2db18dcc60b 100644 --- a/srcpkgs/dhcp/template +++ b/srcpkgs/dhcp/template @@ -1,7 +1,7 @@ # Template file for 'dhcp' pkgname=dhcp version=4.4.2P1 -revision=1 +revision=2 wrksrc="dhcp-${version/P/-P}" build_style=gnu-configure hostmakedepends="perl tar automake libtool"