私はUPSの停電時に終了するようにDebian Jessieを実行する組み込みデバイスを設定しています。残念ながら、デバイスのブートローダはオペレーティングシステムがシャットダウンするたびに再起動するため、shutdown / haltコマンドは再起動と同じです。
私の主な関心事は、接続されたハードドライブのデータを保護することです。私の考えに最善の選択は、できるだけ多くのタスクを終了し、電源が切れるのを待つことです。systemctl isolate emergency.target
ディスクがマウントされたままであることを除いて、私が望むものと非常によく似ています。final.target
デフォルトでは、実際のシャットダウン/停止コマンドなしでSystemdを有効にする方法はありますか?
ベストアンサー1
systemctl halt
成功することもできます。マニュアルから:
halt
Shut down and halt the system. This is mostly equivalent to
systemctl start halt.target --job-mode=replace-irreversibly
--no-block, but also prints a wall message to all users. This
command is asynchronous; it will return after the halt operation is
enqueued, without waiting for it to complete. Note that this
operation will simply halt the OS kernel after shutting down,
leaving the hardware powered on. Use systemctl poweroff for
powering off the system (see below).