Control: tags -1 patch

Hi Dimitris,

since the fix for this goes to experimental and it may takes some time,
I'm attaching a patch that should stop the flooding of logs; you need
to manually edit files in /etc/sv/dhclient/* thought ..

diff --git a/sv/dhclient/check b/sv/dhclient/check
index e406a77..ad2a474 100755
--- a/sv/dhclient/check
+++ b/sv/dhclient/check
@@ -1,5 +1,9 @@
 #!/bin/sh
-. ./conf/interfaces || exit 1
-for i in $INTERFACES; do
-  ifconfig $i |grep 'inet' >/dev/null || exit 1
-done
+. ./conf/interfaces
+if [ -n "$INTERFACES" ]; then
+  for i in $INTERFACES; do
+    ifconfig $i |grep 'inet' >/dev/null || exit 1
+  done
+else
+  ifconfig |grep 'inet' >/dev/null || exit 1
+fi
diff --git a/sv/dhclient/conf/interfaces b/sv/dhclient/conf/interfaces
index c5f1bb2..1f9775b 100644
--- a/sv/dhclient/conf/interfaces
+++ b/sv/dhclient/conf/interfaces
@@ -1 +1 @@
-INTERFACES=eth1
+INTERFACES=
diff --git a/sv/dhclient/run b/sv/dhclient/run
index 2cc7fca..7bc3482 100755
--- a/sv/dhclient/run
+++ b/sv/dhclient/run
@@ -1,10 +1,10 @@
 #!/usr/bin/env /lib/runit/invoke-run
 #Copyright: 2005-2008 Gerrit Pape <[email protected]>
-#             2022  Lorenzo Puliti <[email protected]>
+#             2022-2023  Lorenzo Puliti <[email protected]>
 #License: BSD-3-Clause
 
 exec 2>&1
 
 . ./conf/interfaces || exit 162
 
-exec chpst -m12000000 dhclient -d $INTERFACES
+exec chpst -m12000000 dhclient -d ${INTERFACES:-}
-- 

On Mon, 27 Mar 2023 11:06:55 +0300 "Dimitris T."
<[email protected]> wrote:
> Package: runit-services
> Version: 0.5.4
> Severity: normal
> 
> Hey Lorenzo,
> 
> have been flooded with syslog entries of : 
> 
> "
> 2023-03-26_18:39:14.63103 Internet Systems Consortium DHCP Client
> 4.4.3-P1 2023-03-26_18:39:14.63109 Copyright 2004-2022 Internet
> Systems Consortium. 2023-03-26_18:39:14.63110 All rights reserved.
> 2023-03-26_18:39:14.63116 For info, please visit
> https://www.isc.org/software/dhcp/ 2023-03-26_18:39:14.63117 
> 2023-03-26_18:39:14.65832 Cannot find device "eth1"
> 2023-03-26_18:39:14.67499 Failed to get interface index: No such
> device 2023-03-26_18:39:14.67502 
> 2023-03-26_18:39:14.67503 If you think you have received this message
> due to a bug rather 2023-03-26_18:39:14.67503 than a configuration
> issue please read the section on submitting 2023-03-26_18:39:14.67504
> bugs on either our web page at www.isc.org or in the README file
> 2023-03-26_18:39:14.67505 before submitting a bug.  These pages
> explain the proper 2023-03-26_18:39:14.67509 process and the
> information we find helpful for debugging. 2023-03-26_18:39:14.67510
> 2023-03-26_18:39:14.67511 exiting. "
> 
> those log entries are written every second(!) in syslog AND
> /var/log/runit/dhclient/current... source of the "problem" seems to
> be that /usr/share/runit/sv/dhclient/conf/interfaces uses hardcoded
> "eth1" by default, when there is no "eth1" on this system.. maybe
> option value should be empty by default or commented out (?). not
> sure what's the best approach for defaults in this runit service.
> 
> thx in advance,
> d.
> 
> 
> 
> -- System Information:
> Debian Release: 12.0
> merged-usr: no
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 6.1.18-antix.1-amd64-smp (SMP w/4 CPU threads; PREEMPT)
> Locale: LANG=el_GR.UTF-8, LC_CTYPE=el_GR.UTF-8 (charmap=UTF-8),
> LANGUAGE not set Shell: /bin/sh linked to /bin/dash
> Init: runit (via /run/runit.stopit)
> 
> Versions of packages runit-services depends on:
> ii  runit         2.1.2-54
> ii  runit-helper  2.15.2
> 
> Versions of packages runit-services recommends:
> ii  runit-init  2.1.2-54
> 
> Versions of packages runit-services suggests:
> pn  socklog  <none>
> 
> -- no debconf information
> 
> 

Reply via email to