<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; halt, shutdown -hH now]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=31946&amp;type=atom" />
	<updated>2013-11-16T20:55:25Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=31946</id>
		<entry>
			<title type="html"><![CDATA[Re: halt, shutdown -hH now]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376429#p376429" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2013-11-16T20:55:25Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376429#p376429</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: halt, shutdown -hH now]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376427#p376427" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[-=Serj=-]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16175</uri>
			</author>
			<updated>2013-11-16T20:24:46Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376427#p376427</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: halt, shutdown -hH now]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376381#p376381" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2013-11-16T14:49:36Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376381#p376381</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: halt, shutdown -hH now]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376276#p376276" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2013-11-15T21:10:47Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376276#p376276</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[halt, shutdown -hH now]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376254#p376254" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2013-11-15T17:43:51Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376254#p376254</id>
		</entry>
</feed>
