aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-11-12 18:10:58 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-11-12 18:10:58 +0100
commite677049b80b7a5b9e6c5538eb485296ff82d4bd9 (patch)
tree6118d2a6fb4fa0cd36974ea6734ce16f7d008f65
parenta7f32f039b5704beacc097ecba3a19149ae7ac27 (diff)
sleep to allow eth1 to come up instead of relying on init supervision
-rw-r--r--src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 3b95a0b..691b017 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,7 @@
use std::fs::{File, OpenOptions};
use tokio::sync::mpsc;
+use tokio::time::{self, Duration};
use rsdsl_ip_config::DsConfig;
use rsdsl_pppoe3::{Client, Error, Result};
@@ -17,6 +18,10 @@ struct Config {
async fn main() -> Result<()> {
println!("[info] init");
+ time::sleep(Duration::from_secs(10)).await;
+
+ println!("[info] startup");
+
let mut config_file = File::open("/data/pppoe.conf")?;
let config: Config = serde_json::from_reader(&mut config_file)?;