<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=6879&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] runit: a suggestion for dhcpcd5 run file]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=6879</link>
		<description><![CDATA[The most recent posts in [SOLVED] runit: a suggestion for dhcpcd5 run file.]]></description>
		<lastBuildDate>Wed, 09 Oct 2024 17:58:16 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] runit: a suggestion for dhcpcd5 run file]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=52594#p52594</link>
			<description><![CDATA[<p>This script is broken. If main dhcpcd starts sooner, interface specific instances just relay their job to the main daemon and exit.</p>]]></description>
			<author><![CDATA[dummy@example.com (Alverstone)]]></author>
			<pubDate>Wed, 09 Oct 2024 17:58:16 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=52594#p52594</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] runit: a suggestion for dhcpcd5 run file]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=52567#p52567</link>
			<description><![CDATA[<div class="codebox"><pre class="vscroll"><code>#!/bin/sh

# symlink this run file to your dhcpcd[-&lt;interface&gt;] directory
# or symlink the entire service directory to get the Manager mode

[ -f ./conf ] &amp;&amp; . ./conf
iface=&quot;$(pwd -L)&quot;
iface=&quot;${iface##/*/}&quot;
case &quot;$iface&quot; in
	*&quot;-&quot;*) iface=&quot;${iface#*-}&quot;;;
	*) iface=&quot;&quot;;;
esac

if [ -n &quot;$iface&quot; ]; then
	# don&#039;t use -M here in DHCPCD_ARGS, probably not what you want
	exec dhcpcd -B ${DHCPCD_ARGS} &quot;$iface&quot; 2&gt;&amp;1 || exit 1
fi

# otherwise interface specific instances get screwed
for srv in /etc/service/dhcpcd-*; do
	sv start &quot;$srv&quot; || exit 1
done
DHCPCD_IGNORE=&quot;&quot;
for pf in /run/dhcpcd/*.pid; do
	iface=&quot;${pf##/*/}&quot;
	iface=&quot;${iface%.pid}&quot;
	DHCPCD_IGNORE=&quot;${DHCPCD_IGNORE}${DHCPCD_IGNORE:+&quot; &quot;}-Z $iface&quot;
done

# -M might be redundant
exec dhcpcd -B ${DHCPCD_ARGS:--M} $DHCPCD_IGNORE 2&gt;&amp;1</code></pre></div><p>Create <span class="bbc">/etc/sv/dhcpcd</span>, put the run file there. Create <span class="bbc">/etc/sv/dhcpcd-eth0</span> directory, symlink the run file inside. Symlink both directories into <span class="bbc">/etc/service</span>. One will start an interface specific instance, the other will start in management mode for all interfaces, except those, which are handled by interface specific instances.</p><p>There is a serious problem here, which I don&#039;t know how to fix properly: sysvinit&#039;s dhcpcd service. If you only put interface specific instances in /etc/service, then sysvinit&#039;s dhcpcd service will start in management mode for all interfaces and screw all your interface specific instances. Maybe put a dummy dhcpcd service in /etc/service which just sleeps forever. Maybe use no.emulate.sysv. Maybe there&#039;s a better solution. I use no.emulate.sysv.</p>]]></description>
			<author><![CDATA[dummy@example.com (Alverstone)]]></author>
			<pubDate>Tue, 08 Oct 2024 13:03:07 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=52567#p52567</guid>
		</item>
	</channel>
</rss>
