4. サービスの設定

私的な見解でサービスの設定変更、有効化・無効化をしています

root@ubuntu:~# touch /etc/cloud/cloud-init.disabled

OS 起動中に A start job is running for wait for network to be configured で2分待ちたくない場合

root@ubuntu:~# systemctl status systemd-networkd-wait-online
● systemd-networkd-wait-online.service - Wait for Network to be Configured
   Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-10-09 11:04:09 JST; 1h 11min ago
     Docs: man:systemd-networkd-wait-online.service(8)
  Process: 612 ExecStart=/lib/systemd/systemd-networkd-wait-online (code=exited, status=1/FAILURE)
 Main PID: 612 (code=exited, status=1/FAILURE)

Oct 09 11:02:09 ubuntu systemd[1]: Starting Wait for Network to be Configured...
Oct 09 11:02:09 ubuntu systemd-networkd-wait-online[612]: ignoring: lo
Oct 09 11:02:09 ubuntu systemd-networkd-wait-online[612]: ignoring: lo
Oct 09 11:02:09 ubuntu systemd-networkd-wait-online[612]: ignoring: lo
Oct 09 11:04:09 ubuntu systemd-networkd-wait-online[612]: Event loop failed: Connection timed out
Oct 09 11:04:09 ubuntu systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Oct 09 11:04:09 ubuntu systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Oct 09 11:04:09 ubuntu systemd[1]: Failed to start Wait for Network to be Configured.

エラーっぽいメッセージが表示されている場合

systemctl edit systemd-networkd-wait-online.service

[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --ignore=ens160
“ens160” 部分は、環境に合わせて記述のこと

再起動して確認

root@ubuntu:~# systemctl status systemd-networkd-wait-online
● systemd-networkd-wait-online.service - Wait for Network to be Configured
   Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/systemd-networkd-wait-online.service.d
           └─override.conf
   Active: active (exited) since Wed 2019-10-09 12:42:13 JST; 36min ago
     Docs: man:systemd-networkd-wait-online.service(8)
  Process: 612 ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --ignore=ens160 (code=exited, status=0/SUCCESS)
 Main PID: 612 (code=exited, status=0/SUCCESS)
   
Oct 09 12:42:13 ubuntu systemd[1]: Starting Wait for Network to be Configured...
Oct 09 12:42:13 ubuntu systemd-networkd-wait-online[612]: ignoring: lo
Oct 09 12:42:13 ubuntu systemd-networkd-wait-online[612]: ignoring: ens160
Oct 09 12:42:13 ubuntu systemd[1]: Started Wait for Network to be Configured.

コメントを入力:
 
  • linux/ubuntu/main/service
  • 最終更新: 2019/10/16
  • (外部編集)