<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 08/24/2011 12:35 AM, Gerardo Exequiel Pozzi wrote:
<blockquote cite="mid:4E547196.60503@yahoo.com.ar" type="cite">Hello,
<br>
<br>
I am testing this for archiso (I think will help me for
dm-snapshot persistent). I am writing custom shutdown hooks that
fit for archiso. Anyway, /run is mounted as noexec. This should be
changed ;)
<br>
<br>
:: Creating shutdown ramfs...chroot: can't execute '/bin/busybox':
Permission denied
<br>
<br>
all rest of things will fail ;)
<br>
<br>
<a class="moz-txt-link-freetext" href="http://mailman.archlinux.org/pipermail/arch-projects/2011-July/001549.html">http://mailman.archlinux.org/pipermail/arch-projects/2011-July/001549.html</a>
<br>
<br>
</blockquote>
<br>
Another thing is the last code about halt/poweroff/reboot.<br>
<br>
<pre><div style="background-color: transparent;" class="line" id="LC23"><span class="c"># reboot / poweroff / halt, depending on the argument passed by init</span></div><div style="background-color: transparent;" class="line" id="LC24"><span class="c"># if something invalid is passed, we halt</span></div><div style="background-color: transparent;" class="line" id="LC25"><span class="k">case</span> <span class="s2">"$1"</span> in</div><div style="background-color: transparent;" class="line" id="LC26"> reboot|poweroff|halt<span class="o">)</span> <span class="s2">"$1"</span> -f ;;</div><div style="background-color: transparent;" class="line" id="LC27"> *<span class="o">)</span> halt -f;;</div><div style="background-color: transparent;" class="line" id="LC28"><span class="k">esac</span></div></pre>
<br>
$1 is undefined here, so always go to halt -f. why not take decision
from $RUNLEVEL?, this variable is defined at this stage.<br>
<br>
like in rc.shutdown:<br>
<br>
if [[ $RUNLEVEL == 0 ]]; then<br>
poweroff -f<br>
else<br>
reboot -f<br>
fi<br>
<br>
And we need to use poweroff and not halt, it just stop the system
without calling acpi_poweroff().<br>
<pre class="moz-signature" cols="72">--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1
</pre>
</body>
</html>