+}
+
+static void set_env(const char *name, const char *value) {
+ char **e;
+ size_t l;
+
+ assert(name);
+ assert(value);
+
+ l = strlen(name);
+
+ for (e = environ; *e; e++) {
+ /* Search for the variable */
+ if (strlen(*e) < l+1)
+ continue;
+
+ if (strncmp(*e, name, l) != 0 || (*e)[l] != '=')
+ continue;
+
+ /* We simply free the record, sicne we know that we created it previously */
+ avahi_free(*e);
+ *e = avahi_strdup_printf("%s=%s", name, value);
+ return;
+ }
+
+ assert(0);
+}
+
+static void run_script(int new, AvahiIfIndex interface, AvahiProtocol protocol, const char *address) {
+ char *p;
+ int ret;
+ char ia[16], pa[16];
+ char name[IFNAMSIZ+1];