summaryrefslogtreecommitdiff
path: root/hscript
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-06-24 00:39:58 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-06-24 00:39:58 -0500
commitf269dabec9ea44084692991877eacda60d78c355 (patch)
tree27ff2a7ada30c3751e46b42983960aa416c08434 /hscript
parent993d5eec1d22730b6e01f1d62551167cb6064c68 (diff)
downloadhorizon-f269dabec9ea44084692991877eacda60d78c355.tar.gz
horizon-f269dabec9ea44084692991877eacda60d78c355.tar.bz2
horizon-f269dabec9ea44084692991877eacda60d78c355.tar.xz
horizon-f269dabec9ea44084692991877eacda60d78c355.zip
Fix network state issue on live installs, and firmware install
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
)
);