<?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=4865&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Missing init scripts and how to provide them]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=4865</link>
		<description><![CDATA[The most recent posts in Missing init scripts and how to provide them.]]></description>
		<lastBuildDate>Fri, 14 Jun 2024 17:05:54 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Missing init scripts and how to provide them]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=50525#p50525</link>
			<description><![CDATA[<div class="codebox"><pre><code>$ /etc/init.d/alsa-utils
Usage: /etc/init.d/alsa-utils {start [CARD]|stop [CARD]|restart [CARD]|reset [CARD]}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (igorzwx)]]></author>
			<pubDate>Fri, 14 Jun 2024 17:05:54 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=50525#p50525</guid>
		</item>
		<item>
			<title><![CDATA[Re: Missing init scripts and how to provide them]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=50523#p50523</link>
			<description><![CDATA[<p>Hi <br />I tested this script sysd2v.sh and it failed.<br />The start stop functions were not created.</p><p>YMMV.</p>]]></description>
			<author><![CDATA[dummy@example.com (bai4Iej2need)]]></author>
			<pubDate>Fri, 14 Jun 2024 16:46:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=50523#p50523</guid>
		</item>
		<item>
			<title><![CDATA[Re: Missing init scripts and how to provide them]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=34635#p34635</link>
			<description><![CDATA[<p>This is generated from /lib/systemd/system/alsa-restore.service in my Arch box:</p><div class="codebox"><pre class="vscroll"><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.
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:       alsa-restore
# Required-Start: $remote_fs
# Required-Stop:  $remote_fs
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    Save/Restore Sound Card State
### END INIT INFO
DESC=&quot;alsa-restore&quot;
DAEMON=none
PIDFILE=none

do_start_cmd_override ()
{
  /usr/sbin/alsactl restore
  true
}

do_stop_cmd_override ()
{
  /usr/sbin/alsactl store
  true
}

do_status_override () :</code></pre></div><p>^ Save that to /etc/init.d/alsa-restore and run</p><div class="codebox"><pre><code># update-rc.d alsa-restore defaults</code></pre></div><p>Disclaimer: untested.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sun, 13 Feb 2022 20:43:03 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=34635#p34635</guid>
		</item>
		<item>
			<title><![CDATA[Re: Missing init scripts and how to provide them]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=34630#p34630</link>
			<description><![CDATA[<p>Is there some way to reinstate the missing alsa restore and save sound card state in devuan?</p>]]></description>
			<author><![CDATA[dummy@example.com (MLEvD)]]></author>
			<pubDate>Sun, 13 Feb 2022 18:09:44 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=34630#p34630</guid>
		</item>
		<item>
			<title><![CDATA[Missing init scripts and how to provide them]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=34450#p34450</link>
			<description><![CDATA[<p>With the advancing encroachment of systemd across the Linux ecosystem it is now not unusual for applications to only supply systemd unit files and omit traditional init scripts. This prevents users of alternative init systems from automatically starting system daemons and other services at boot.</p><p>For the bullseye release Debian has provided a small selection of &quot;orphaned&quot; init scripts that can be installed in Devuan chimaera (or later) with</p><div class="codebox"><pre><code># apt install orphan-sysvinit-scripts</code></pre></div><p>A list of the scripts and their locations can be found here:</p><p><a href="https://packages.debian.org/bullseye/all/orphan-sysvinit-scripts/filelist" rel="nofollow">https://packages.debian.org/bullseye/al … s/filelist</a></p><p>To use the scripts copy them from /usr/share/orphan-sysvinit-scripts/ to /etc/init.d/ and run this command to make them start automatically from the next boot:</p><div class="codebox"><pre><code># update-rc.d script defaults</code></pre></div><p>To start the script immediately use</p><div class="codebox"><pre><code># service script start</code></pre></div><p>In both cases replace <span class="bbc">script</span> with the actual name of the file that was copied to /etc/init.d/.</p><p>For the applications not covered by the above package there is a <span class="bbc">sysv2d.sh</span> script that can be downloaded from <a href="https://git.savannah.nongnu.org/cgit/sysvinit.git/tree/contrib/sysd2v.sh" rel="nofollow">here</a> by using this command:</p><div class="codebox"><pre><code>$ wget https://git.savannah.nongnu.org/cgit/sysvinit.git/plain/contrib/sysd2v.sh</code></pre></div><p>To use it make the script executable and move it to a directory in your user&#039;s PATH:</p><div class="codebox"><pre><code>$ chmod +x sysd2v.sh
# mv sysd2v.sh /usr/local/bin/sysd2v</code></pre></div><p>Once that is done the command can be used on any systemd unit files[1] like this:</p><div class="codebox"><pre><code>$ sysv2d example.service &gt; example
# mv example /etc/init.d/</code></pre></div><p>In both commands replace <span class="bbc">example</span> with the actual name of the unit file.</p><p>Once the script is moved to /etc/init.d/ it can be enabled with <span class="bbc">update-rc.d</span> and started with <span class="bbc">service</span> as outlined earlier.</p><p>(In this thread commands prefixed with <span class="bbc">$</span> should be run as the normal user and commands prefixed with <span class="bbc">#</span> should be run as root; in both cases the prefix should be omitted when running the actual command.)</p><p>[1] The systemd .service unit files for installed packages can be found under /lib/systemd/system/.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sun, 06 Feb 2022 20:19:17 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=34450#p34450</guid>
		</item>
	</channel>
</rss>
