summaryrefslogtreecommitdiff
path: root/hscript
diff options
context:
space:
mode:
Diffstat (limited to 'hscript')
-rw-r--r--hscript/script_e.cc6
-rw-r--r--hscript/script_v.cc2
2 files changed, 6 insertions, 2 deletions
diff --git a/hscript/script_e.cc b/hscript/script_e.cc
index cf004a0..b8087e6 100644
--- a/hscript/script_e.cc
+++ b/hscript/script_e.cc
@@ -485,7 +485,11 @@ bool Script::execute() const {
+ iface, ec.message());
EXECUTE_FAILURE("network");
} else {
- run_command("service", {"net." + iface, "start"});
+ std::ifstream statefs("/sys/class/net/" + iface + "/operstate");
+ char state;
+ statefs.read(&state, 1);
+ if(state != 'u')
+ run_command("service", {"net." + iface, "start"});
}
}
break;
diff --git a/hscript/script_v.cc b/hscript/script_v.cc
index 0aeaad9..1fc3726 100644
--- a/hscript/script_v.cc
+++ b/hscript/script_v.cc
@@ -139,7 +139,7 @@ bool add_default_repos(std::vector<std::unique_ptr<Repository>> &repos,
if(firmware) {
Repository *fw_key = dynamic_cast<Repository *>(
Repository::parseFromData(
- "https://distfiles.apkfission.net/adelie-stable/nonfree",
+ "https://distfiles.apkfission.net/adelie/1.0/nonfree",
{"internal", 0}, nullptr, nullptr, s
)
);