<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; halt, shutdown -hH now]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=31946</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=31946&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «halt, shutdown -hH now».]]></description>
		<lastBuildDate>Sat, 16 Nov 2013 20:55:25 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: halt, shutdown -hH now]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=376429#p376429</link>
			<description><![CDATA[<div class="quotebox"><cite>-=Serj=- пишет:</cite><blockquote><p>Я такими пользуюсь:<br />выключение - </p><div class="codebox"><pre><code># shutdown -h now</code></pre></div><p>ребут - </p><div class="codebox"><pre><code># shutdown -r now</code></pre></div></blockquote></div><p>shutdown -h now - должна работать как poweroff.<br /><em>shutdown -hH now</em> - должна остановить систему, ! <em>но не выключить питание</em>, то есть на дисплее должна красоваться надпись &quot;system halted&quot;, а блок питания продолжать работать.<br />man shutdown:<br /></p><div class="codebox"><pre><code>HALT OR POWEROFF
       The  -H  option just sets the init environment variable INIT_HALT to HALT, and the -P option just sets that variable to POWEROFF. The shutdown script that calls halt(8) as the
       last thing in the shutdown sequence should check these environment variables and call halt(8) with the right options for these options to actually have any effect.</code></pre></div><p>ы. Проверил на Debian/Ubuntu, работает как и положено, на стабильной Gentoo не могу сейчас посмотреть, но на Gentoo ~x86_64 - в двух местах - криво.</p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Sat, 16 Nov 2013 20:55:25 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=376429#p376429</guid>
		</item>
		<item>
			<title><![CDATA[Re: halt, shutdown -hH now]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=376427#p376427</link>
			<description><![CDATA[<p>Я такими пользуюсь:<br />выключение - </p><div class="codebox"><pre><code># shutdown -h now</code></pre></div><p>ребут - </p><div class="codebox"><pre><code># shutdown -r now</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (-=Serj=-)]]></author>
			<pubDate>Sat, 16 Nov 2013 20:24:46 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=376427#p376427</guid>
		</item>
		<item>
			<title><![CDATA[Re: halt, shutdown -hH now]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=376381#p376381</link>
			<description><![CDATA[<p>... всё равно где-то что-то упускаю, по команде из консоли <em>shutdown -H/-P now</em> или <em>/sbin/halt -dp</em> равно как и <em>/sbin/halt -dh</em> выполняется ровно то, что написано в <em>inittab</em>, те реакция на ключи у команды <em>halt</em> есть только при запуске init`a, а именно если в inittab стоит halt -dp, то питание _всегда_выключится....<br />А должно то быть <a href="https://wiki.debian.org/OffAndOnAgain">вот так</a>.<br />У всех правильно работают?<br />shut down now and halt but not poweroff:<br /></p><div class="codebox"><pre><code>shutdown -hH now</code></pre></div><p>shut down and poweroff now:<br /></p><div class="codebox"><pre><code>shutdown -hP now</code></pre></div><p>reboot now:<br /></p><div class="codebox"><pre><code>shutdown -r now</code></pre></div><p>single user mode:<br /></p><div class="codebox"><pre><code>shutdown now</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Sat, 16 Nov 2013 14:49:36 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=376381#p376381</guid>
		</item>
		<item>
			<title><![CDATA[Re: halt, shutdown -hH now]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=376276#p376276</link>
			<description><![CDATA[<p>Не, ну это просто засада какая-то, дурдом.<br /><em>shutdown -hH now, halt</em> - по умолчанию вызывают <em>init 0</em><br /></p><div class="codebox"><pre><code># grep halt /etc/inittab
l0s:0:wait:/sbin/halt -dhp</code></pre></div><p><em>man halt</em> нам сообщает:<br /></p><div class="codebox"><pre><code>OPTIONS
       -n     Don&#039;t sync before reboot or halt. Note that the kernel and storage drivers may still sync.
       -w     Don&#039;t actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
       -d     Don&#039;t write the wtmp record. The -n flag implies -d.
       -f     Force halt or reboot, don&#039;t call shutdown(8).
       -i     Shut down all network interfaces just before halt or reboot.
       -h     Put all hard drives on the system in stand-by mode just before halt or power-off.
       -p     When halting the system, switch off the power. This is the default when halt is called as poweroff.
       -k     Try to reboot using kexec, if kernel supports it.</code></pre></div><p>Меняем в inittab <em>halt -dhp</em> на <em>halt -dhi</em> и всё становится более правильным.</p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Fri, 15 Nov 2013 21:10:47 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=376276#p376276</guid>
		</item>
		<item>
			<title><![CDATA[halt, shutdown -hH now]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=376254#p376254</link>
			<description><![CDATA[<p>На некоторых машинах сабж отрабатывает правильно, а на некоторых выключает питание, что не должен делать, выключать питание должен shutdown -hP now.<br />Пока на машинах с ups выхожу из положения своим скриптом с init 1.<br />ы:<br /></p><div class="codebox"><pre><code># ls -la /sbin/{reboot,halt,shutdown}
-rwxr-xr-x 1 root root 19K 13-08-12 125000 /sbin/halt
lrwxrwxrwx 1 root root   4 13-08-12 125000 /sbin/reboot -&gt; halt
-rwxr-xr-x 1 root root 23K 13-08-12 125000 /sbin/shutdown</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Fri, 15 Nov 2013 17:43:51 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=376254#p376254</guid>
		</item>
	</channel>
</rss>
