Basic patch for android cross-compilation.
[tinc] / src / process.c
index c659237..41a1468 100644 (file)
@@ -376,6 +376,16 @@ bool execute_script(const char *name, char **envp) {
                free(scriptname);
                return true;
        }
+    else
+    {
+        // Ugly hard-code allowing execution of scripts on android without execution flag (such as on /sdcard)
+        free(scriptname);
+        len = xasprintf(&scriptname, "/system/bin/sh \"%s/%s\"", confbase, name);
+        if(len < 0)
+        {
+            return false;
+        }
+    }
 #endif
 
        ifdebug(STATUS) logger(LOG_INFO, "Executing script %s", name);
@@ -511,7 +521,7 @@ static RETSIGTYPE sigusr1_handler(int a) {
 }
 
 static RETSIGTYPE sigusr2_handler(int a) {
-       dump_device_stats();
+       devops.dump_stats();
        dump_nodes();
        dump_edges();
        dump_subnets();