wait for network online before launching init (#1930)

This commit is contained in:
Aiden McClelland
2022-11-09 14:51:23 -07:00
parent a7173b6bc9
commit 60534597e0
3 changed files with 4 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
[Unit]
Description=Embassy Init
After=network.target
Requires=network.target
After=network-online.target
Requires=network-online.target
Wants=avahi-daemon.service tor.service
[Service]

View File

@@ -32,7 +32,7 @@ async fn setup_or_init(cfg_path: Option<PathBuf>) -> Result<(), Error> {
let ctx = InstallContext::init(cfg_path).await?;
let embassy_ip = dbg!(get_current_ip(ctx.ethernet_interface.to_owned()).await?);
let embassy_ip = get_current_ip(ctx.ethernet_interface.to_owned()).await?;
let embassy_ip_fqdn: ResourceFqdn = embassy_ip.parse()?;
let embassy_fqdn: ResourceFqdn = "pureos.local".parse()?;

View File

@@ -43,6 +43,7 @@ dns=systemd-resolved
managed=true
EOF
$SYSTEMCTL enable systemd-resolved.service
$SYSTEMCTL enable systemd-networkd-wait-online.service
$SYSTEMCTL disable wpa_supplicant.service
$SYSTEMCTL disable postgresql.service