<?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=4478&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] How to run a root command on startup?]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=4478</link>
		<description><![CDATA[The most recent posts in [SOLVED] How to run a root command on startup?.]]></description>
		<lastBuildDate>Wed, 01 Sep 2021 00:35:10 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] How to run a root command on startup?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=31239#p31239</link>
			<description><![CDATA[<p>I would just stick it in /etc/rc.local. I do a similar thing to defeat the power-saving on my sound card, which makes nasty pops:</p><div class="codebox"><pre><code>#!/bin/bash
echo 0 &gt; /sys/module/snd_hda_intel/parameters/power_save
exit 0</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (sgage)]]></author>
			<pubDate>Wed, 01 Sep 2021 00:35:10 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=31239#p31239</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to run a root command on startup?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=31238#p31238</link>
			<description><![CDATA[<p>Aight, here is the script (I used manual for &#039;init-d-script&#039; for syntax <span class="bbc">man init-d-script</span>):</p><div class="codebox"><pre><code>#!/bin/bash
### BEGIN INIT INFO
# Provides:          dead_XHC1
# Required-Start: $all
# Required-Stop:  
# Default-Start:  2 
# Default-Stop:   
# Short-Description: Disable wake on XHC1
# Description:       Disable wake on XHC1
#                  
### END INIT INFO
echo XHC1 &gt; /proc/acpi/wakeup
exit 0</code></pre></div><p>Then I made it executable </p><div class="codebox"><pre><code>chmod +x /etc/init.d/dead_XHC1</code></pre></div><p>Then added to the service list </p><div class="codebox"><pre><code>sudo update-rc.d &#039;dead_XHC1&#039; defaults</code></pre></div><p>P.S:<br />Btw, this script fixes not properly working suspend on lid close for certain laptops that have issue with brcfmac driver. <br />You might want to play around with what device you need to disable; The enabled devices available at: </p><div class="codebox"><pre><code>cat /proc/acpi/wakeup</code></pre></div><p>Hope this will help someone, coz I spend days trying to figure out what&#039;s wrong with suspend.</p>]]></description>
			<author><![CDATA[dummy@example.com (xsR_head)]]></author>
			<pubDate>Tue, 31 Aug 2021 22:46:21 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=31238#p31238</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to run a root command on startup?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=31237#p31237</link>
			<description><![CDATA[<p>Aight, I think I figured it out, looking at other scripts. Gonna mark the question as [SOLVED] when done.</p>]]></description>
			<author><![CDATA[dummy@example.com (xsR_head)]]></author>
			<pubDate>Tue, 31 Aug 2021 21:43:58 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=31237#p31237</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to run a root command on startup?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=31236#p31236</link>
			<description><![CDATA[<p>I am pretty sure you are confusing sysvinit <span class="bbc">update-rc.d</span> with OpenRC <span class="bbc">rc-update</span>. <br />P.S I previously used OpenRC on Artix <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (xsR_head)]]></author>
			<pubDate>Tue, 31 Aug 2021 21:17:48 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=31236#p31236</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to run a root command on startup?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=31235#p31235</link>
			<description><![CDATA[<p>You use SysVinit, but issue commands for OpenRC? Best read up on boot scripts for sysvinit then <img src="http://dev1galaxy.org/img/smilies/tongue.png" width="15" height="15" alt="tongue" /> Also, it&#039;s best practice to end a script with </p><div class="codebox"><pre><code>exit 0</code></pre></div><p>HTH!</p>]]></description>
			<author><![CDATA[dummy@example.com (Dutch_Master)]]></author>
			<pubDate>Tue, 31 Aug 2021 21:07:50 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=31235#p31235</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] How to run a root command on startup?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=31234#p31234</link>
			<description><![CDATA[<p>Hello, I want the following command to run at system startup:<br /><span class="bbc">echo XHC1 &gt; /proc/acpi/wakeup</span><br />I have a sysvinit initialisation system. As far as I understand I need to create a script and place it in <span class="bbc">/etc/init.d/</span> then run <span class="bbc">sudo update-rc.d &#039;service name&#039; defaults</span>. I created a simple bash script:<br /><span class="bbc">#!/bin/bash<br />echo XHC1 &gt; /proc/acpi/wakeup<br /></span>but it seems that I am doing something wrong since the update-rc.d command shows error when I add the script to default run level, and the script doesn&#039;t execute for some reason.<br />Best regards</p><p>P.S<br />As far as I understand the script should be compliant to some sysvinit syntax, but I can&#039;t figure what are the exact rules.</p>]]></description>
			<author><![CDATA[dummy@example.com (xsR_head)]]></author>
			<pubDate>Tue, 31 Aug 2021 20:32:15 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=31234#p31234</guid>
		</item>
	</channel>
</rss>
