chiark / gitweb /
resolved: when there's already somebody listening on the LLMNR ports, simple disable...
[elogind.git] / src / rfkill / rfkill.c
index ad1d63d32deaaba1a778492397e6b79a775fbec7..c7c659292abefb0fb0ece120bbf70878fe4dd47d 100644 (file)
@@ -86,7 +86,7 @@ int main(int argc, char *argv[]) {
                         return EXIT_FAILURE;
                 }
 
-                saved = strjoin("/var/lib/systemd/rfkill/", escaped_path_id, "-", escaped_name, NULL);
+                saved = strjoin("/var/lib/systemd/rfkill/", escaped_path_id, ":", escaped_name, NULL);
         } else
                 saved = strjoin("/var/lib/systemd/rfkill/", escaped_name, NULL);
 
@@ -98,6 +98,9 @@ int main(int argc, char *argv[]) {
         if (streq(argv[1], "load")) {
                 _cleanup_free_ char *value = NULL;
 
+                if (!shall_restore_state())
+                        return EXIT_SUCCESS;
+
                 r = read_one_line_file(saved, &value);
                 if (r < 0) {