LoginSignup
0
0

More than 5 years have passed since last update.

systemd-nspawn メモ

Last updated at Posted at 2018-11-13

machinectl shell で終了ステータスを取得したい

machinectl shellでコンテナ側で実行したコマンドの終了ステータスがプロパゲートしてこないですが、systemd-run --wait を使え とのことのようです。
-Mでコマンドを実行するmachineを指定します。

$ sudo systemd-run -M test_01 --wait /bin/false 2>/dev/null
$ echo $?
1
$ sudo systemd-run -M test_01 --wait /bin/true 2>/dev/null
$ echo $?
0
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0