Skip to content

Commit 0ef347b

Browse files
committed
Updated install.rhai script to work with latest memflowup
1 parent 883e497 commit 0ef347b

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

install.rhai

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
fn install_message() {
2-
info("memflow-kvm kernel module installation finished");
3-
info("you might have to manually invoke 'modprobe memflow' after installation and make sure the /dev/memflow device is present and you have access to it.");
4-
info("it is also recommended to setup a 'memflow' user group in linux and add your user to it");
5-
info("additionally, you might want to setup a udev rule thatll make /dev/memflow accessible to that group.");
6-
info("see the readme for more details");
2+
info("memflow-kvm kernel module installation finished");
3+
info("you might have to manually invoke 'modprobe memflow' after installation and make sure the /dev/memflow device is present and you have access to it.");
4+
info("it is also recommended to setup a 'memflow' user group in linux and add your user to it");
5+
info("additionally, you might want to setup a udev rule thatll make /dev/memflow accessible to that group.");
6+
info("see the readme for more details");
77
}
88

99
// builds the connector from a given path (never called by the engine directly)
1010
fn build_from_path(ctx, repo_path) {
11-
info("Installing connector");
12-
cargo("build --release --all-features", repo_path);
13-
ctx.copy_cargo_plugin_artifact(repo_path, name_to_lib(ctx.crate_name()));
11+
info("Installing connector");
12+
cargo("build --release --all-features", repo_path);
13+
ctx.copy_cargo_plugin_artifact(repo_path, name_to_lib(ctx.crate_name()));
1414

15-
info("Installing memflow-kvm kernel module");
16-
ctx.dkms_install(repo_path);
15+
info("Installing memflow-kvm kernel module");
16+
ctx.dkms_install(repo_path);
1717

18-
post_install();
18+
post_install();
1919

20-
install_message();
20+
install_message();
2121
}
2222

2323
// builds the connector from local path
2424
fn build_local(ctx) {
25-
build_from_path(ctx, ctx.build_path())
25+
build_from_path(ctx, ctx.build_path())
2626
}
2727

2828
fn get_source(ctx) {
29-
ctx.clone_repository()
29+
// clone the repository with all submodules via git
30+
ctx.clone_repository()
3031
}
3132

3233
// builds the connector from source
3334
fn build_from_source(ctx) {
34-
build_from_path(ctx, get_source(ctx))
35+
build_from_path(ctx, get_source(ctx))
3536
}
3637

3738
// downloads a binary release of the plugin, still needs dkms
3839
fn install(ctx) {
39-
let release = ctx.github_latest_release();
40-
let libname = name_to_lib_with_arch(ctx.crate_name());
41-
let artifact = download(ctx.github_release_artifact(release, libname));
42-
write_plugin_artifact(artifact);
40+
let libname = name_to_lib_with_arch(ctx.crate_name());
41+
let artifact = ctx.github_release_artifact(libname);
42+
ctx.write_plugin_artifact(artifact, name_to_lib(ctx.crate_name()));
4343

44-
info("Installing memflow-kvm kernel module");
45-
let tarball = download(ctx.github_release_artifact(release, "memflow-" + release.semver() + "-source-only.dkms.tar.gz"));
46-
ctx.dkms_install(tarball);
44+
info("Installing memflow-kvm kernel module");
45+
let tarball = download(ctx.github_release_artifact(release, "memflow-" + release.semver() + "-source-only.dkms.tar.gz"));
46+
ctx.dkms_install(tarball);
4747

48-
post_install();
48+
post_install();
4949

50-
install_message();
50+
install_message();
5151
}
5252

5353
fn post_install() {
54-
try {
55-
udev_add_rule("memflow-kvm", "KERNEL==\"memflow\" SUBSYSTEM==\"misc\" GROUP=\"memflow\" MODE=\"0660\"");
56-
} catch (err) {
57-
info("Your memflowup installation might be out of date, please make sure to use the latest version.")
58-
}
54+
try {
55+
udev_add_rule("memflow-kvm", "KERNEL==\"memflow\" SUBSYSTEM==\"misc\" GROUP=\"memflow\" MODE=\"0660\"");
56+
} catch (err) {
57+
info("Your memflowup installation might be out of date, please make sure to use the latest version.")
58+
}
5959
}

0 commit comments

Comments
 (0)