<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=6381&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / iwd Daemon Not Starting at Boot]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=6381</link>
		<description><![CDATA[The most recent posts in iwd Daemon Not Starting at Boot.]]></description>
		<lastBuildDate>Sun, 28 Jan 2024 20:29:25 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: iwd Daemon Not Starting at Boot]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=47739#p47739</link>
			<description><![CDATA[<p>I kept searching the web for instances of the error message, and eventually I found something helpful:<br /><a href="https://forums.raspberrypi.com/viewtopic.php?t=34782" rel="nofollow">empty runlevels overide LSB defaults</a><br />It turns out that re-installing a script without first <em>removing</em> it can result in this error. So I merely did the following, and it ran without errors, installing the symlinks in the proper locations:</p><div class="codebox"><pre><code># update-rc.d -f iwd remove
# update-rc.d iwd defaults</code></pre></div><p>The manpage for update-rc.d says that running the `remove&#039; directive while the script is still present in /etc/init.d will result in errors. However, that didn&#039;t happen for me. In fact, it was exactly what I needed to do to fix the problem. It removed the symlinks in /etc/rc*.d, which then allowed me to reinstall the script with the default settings.</p><p>[<em>Edit to clarify this paragraph</em>] The manpage <em>doesn&#039;t</em> mention that running update-rc.d with the `defaults&#039; directive when symlinks are already present in /etc/rc*.d <em>will</em> result in errors. There is a paragraph that says it &quot;does nothing&quot; if files exist at /etc/rc*.d/[SK]??, and I <em>think</em> this information is meant to apply to the `default&#039; action, although the wording isn&#039;t really clear. But that&#039;s not really what happened either. In my case, installed kill scripts all over the place.</p><p>It&#039;s all very confusing, but I think I have the proper procedure figured out now.</p>]]></description>
			<author><![CDATA[dummy@example.com (stultumanto)]]></author>
			<pubDate>Sun, 28 Jan 2024 20:29:25 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=47739#p47739</guid>
		</item>
		<item>
			<title><![CDATA[Re: iwd Daemon Not Starting at Boot]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=47698#p47698</link>
			<description><![CDATA[<p>Thanks GlennW, I tried changing the runlevels, but I&#039;m still getting the message about empty runlevels. For some reason update-rc.d is not properly parsing the file. It&#039;s so strange! I also had to install a script for nftables, and it worked fine.</p><p>I wish I&#039;d looked at the rc directories before changing the iwd script to see if it was installed wrong from the start. That could have been the problem from the beginning.</p><p>I&#039;ve got the orphan-sysvinit-scripts package on all my systems now, that&#039;s a good one to have.</p><h5>Edit - update:</h5><p>I used `update-rc.d iwd enable [runlevels]` to force the service to start when I wanted it to. It still doesn&#039;t explain why the default method fails, but at least it works now, and the service starts at boot!</p>]]></description>
			<author><![CDATA[dummy@example.com (stultumanto)]]></author>
			<pubDate>Sat, 27 Jan 2024 05:31:05 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=47698#p47698</guid>
		</item>
		<item>
			<title><![CDATA[Re: iwd Daemon Not Starting at Boot]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=47697#p47697</link>
			<description><![CDATA[<p>change this to </p><div class="codebox"><pre><code># Default-Start:  2 3 4 5
# Default-Stop:   0 1 6</code></pre></div><p>to...</p><div class="codebox"><pre><code># Default-Start:  S
# Default-Stop:   0 6</code></pre></div><p> I hope this helps.</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Sat, 27 Jan 2024 05:24:55 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=47697#p47697</guid>
		</item>
		<item>
			<title><![CDATA[Re: iwd Daemon Not Starting at Boot]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=47696#p47696</link>
			<description><![CDATA[<p>One more thing, not about the startup delay, I understand that.</p><p>I was also instructed to install orphan-sysvinit-scripts</p><p>package description info...</p><div class="codebox"><pre><code>Orphaned System-V-like init scripts
 
This package provides System-V init scripts for packages whose maintainers
have chosen to drop them from the distribution in favour of only supplying
a systemd service file.

It will only put files into /etc/init.d/ when the relevant package is
installed on your system.</code></pre></div><p>rc.local worked for me, but I can&#039;t remember what it was now I needed it for, the devuan system has evolved and matured.</p><p>&lt;edit&gt; it was for starting nftables. <br />the files will be at /usr/share/orphan-sysvinit-scripts/...&lt;/edit&gt;</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Sat, 27 Jan 2024 05:13:26 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=47696#p47696</guid>
		</item>
		<item>
			<title><![CDATA[Re: iwd Daemon Not Starting at Boot]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=47695#p47695</link>
			<description><![CDATA[<p>Sorry to double-post, but this is a semi-separate issue, as <strong>I just realized I missed something really obvious.</strong> When I updated the script with update-rc.d, it put nothing but kill links in the /etc/rc* directories:</p><div class="codebox"><pre><code># update-rc.d iwd defaults
insserv: warning: current start runlevel(s) (empty) of script `iwd&#039; overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `iwd&#039; overrides LSB defaults (0 1 6).</code></pre></div><p>I don&#039;t understand why it&#039;s doing this, as the script has the correct runlevels:</p><div class="codebox"><pre><code>if [ true != &quot;$INIT_D_SCRIPT_SOURCED&quot; ] ; then
    set &quot;$0&quot; &quot;$@&quot;; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:       iwd
# Required-Start: $remote_fs
# Required-Stop:  $remote_fs
# Should-Start:   $network
# Should-Stop:    $network
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    Wireless service
### END INIT INFO</code></pre></div><p>Can anyone explain why update-rc.d isn&#039;t picking up these runlevels? When I update other scripts on the system, it works fine.</p>]]></description>
			<author><![CDATA[dummy@example.com (stultumanto)]]></author>
			<pubDate>Sat, 27 Jan 2024 05:13:08 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=47695#p47695</guid>
		</item>
		<item>
			<title><![CDATA[Re: iwd Daemon Not Starting at Boot]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=47692#p47692</link>
			<description><![CDATA[<p>Thanks, I believe we may already be using the same script, as the /etc/init.d/iwd script that was installed on my system says it was generated by sys2dv:</p><div class="codebox"><pre><code>#!/bin/sh
# Generated by sysd2v v0.3  --  http://www.trek.eu.org/devel/sysd2v
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.</code></pre></div><p>I think the sys2dv script would work fine as it is, if it weren&#039;t for the known bug with the Atheros hardware, which was apparently fixed for the newer chipset (ath10k) but not my older system (ath9k.) This is a really old system (2008) and I don&#039;t think anyone at iwd or the kernel cares about fixing it anymore. I&#039;ll have a look at the <a href="https://git.savannah.nongnu.org/cgit/sysvinit.git/tree/contrib/sysd2v.sh" rel="nofollow">sysd2v script source</a> and see if I can figure out where I need to introduce the 2-second delay that the systemd unit fix would normally provide.</p>]]></description>
			<author><![CDATA[dummy@example.com (stultumanto)]]></author>
			<pubDate>Sat, 27 Jan 2024 04:41:51 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=47692#p47692</guid>
		</item>
		<item>
			<title><![CDATA[Re: iwd Daemon Not Starting at Boot]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=47688#p47688</link>
			<description><![CDATA[<p>Hi, I install iwd like this... For my tethering to iPhone (as a modem...)</p><div class="codebox"><pre><code>apt install iwd

sh /home/glenn/bin/sysd2v-0.3.sh /lib/systemd/system/iwd.service
#rsync -avh /home/glenn/local/other/backup/backup-etc-sys/etc/init.d/iwd.initd /etc/init.d/iwd.initd
rsync -avh /home/glenn/local/other/backup/backup-etc-sys/etc/init.d/iwd.initd /etc/init.d/
rsync -avh /home/glenn/local/other/backup/backup-etc-sys/etc/runlevels/iwd.initd /etc/runlevels/
rsync -avh /home/glenn/local/other/backup/backup-etc-sys/etc/systemd/system/multi-user.target.wants/iwd.service /etc/systemd/system/multi-user.target.wants/
chmod +x /lib/systemd/system/iwd.service
chmod +x /etc/init.d/iwd.initd
service iwd.initd start
update-rc.d iwd.initd defaults

# udev rules for iPhones
rm /lib/udev/rules.d/*-usbmuxd.rules # 85-(?)
rsync -avh /home/glenn/local/data/build/39-usbmuxd.rules /lib/udev/rules.d/
chmod -R 744 /lib/udev/rules.d/39-usbmuxd.rules
chown -Rh root:root /lib/udev/rules.d/39-usbmuxd.rules</code></pre></div><p>As you can see I&#039;m using backups to restore the files.</p><p>The sysd2v-0.3.sh script does most of the work. I got this from more experienced users than I. </p><p>If you search here for sysd2v script, you should be able to find it.</p><p>I hope this helps.</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Sat, 27 Jan 2024 03:10:08 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=47688#p47688</guid>
		</item>
		<item>
			<title><![CDATA[iwd Daemon Not Starting at Boot]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=47670#p47670</link>
			<description><![CDATA[<p>I searched the forum for iwd but couldn&#039;t find anything about this problem specifically. There is apparently a <a href="https://bugs.archlinux.org/task/63912" rel="nofollow">known issue with some Atheros chipsets</a>:</p><div class="quotebox"><blockquote><div><p>a kernel bug where the NEW_WIPHY event is not emitted because it&#039;s too big specifically when using the ath10k driver, so we need to work around it in iwd. Ironically Denis has previously proposed a kernel patch to fix this but it was never accepted.</p></div></blockquote></div><p>Later in that thread, some people report a fix. However, the issue persists on my ath9k hardware. The Arch Wiki <a href="https://wiki.archlinux.org/title/Iwd#Restarting_iwd.service_after_boot" rel="nofollow">suggests adding the following to the systemd unit</a> as a fix:</p><div class="codebox"><pre><code>[Service]
ExecStartPre=/usr/bin/sleep 2</code></pre></div><p>Obviously, this fix won&#039;t work with sysvinit. The Devuan script at /etc/init.d/iwd sources /lib/init/init-d-script, and calls do_start_cmd to launch the daemon. I tried inserting a &#039;sleep 2&#039; command before do_start_cmd, and reinstalling the script via update-rc.d, but the problem persisted. Finally, out of sheer desperation, I added the following lines to the end of my /etc/rc.local:</p><div class="codebox"><pre><code>sleep 2
service iwd start</code></pre></div><p>This actually worked, but clearly it&#039;s a hack. What&#039;s puzzling to me is that, if the rc.local addition worked, why didn&#039;t the edit to the init.d script? Could it just be because it comes later in the boot process?</p>]]></description>
			<author><![CDATA[dummy@example.com (stultumanto)]]></author>
			<pubDate>Fri, 26 Jan 2024 17:44:53 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=47670#p47670</guid>
		</item>
	</channel>
</rss>
