mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
main: Ensure existence of the storage dir at startup
Previously, the storage dir has only been created after a successful network connection, causing removal of Known Network interface from Dbus and failure to register dir watcher until daemon is restarted.
This commit is contained in:
parent
3cf0184089
commit
22318ebbd5
@ -45,6 +45,7 @@
|
|||||||
#include "src/simauth.h"
|
#include "src/simauth.h"
|
||||||
#include "src/adhoc.h"
|
#include "src/adhoc.h"
|
||||||
#include "src/blacklist.h"
|
#include "src/blacklist.h"
|
||||||
|
#include "src/storage.h"
|
||||||
|
|
||||||
#include "src/backtrace.h"
|
#include "src/backtrace.h"
|
||||||
|
|
||||||
@ -470,6 +471,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
exit_status = EXIT_FAILURE;
|
exit_status = EXIT_FAILURE;
|
||||||
|
|
||||||
|
if (create_dirs(DAEMON_STORAGEDIR "/")) {
|
||||||
|
l_error("Failed to create " DAEMON_STORAGEDIR "/");
|
||||||
|
goto fail_dbus;
|
||||||
|
}
|
||||||
|
|
||||||
dbus = l_dbus_new_default(L_DBUS_SYSTEM_BUS);
|
dbus = l_dbus_new_default(L_DBUS_SYSTEM_BUS);
|
||||||
if (!dbus) {
|
if (!dbus) {
|
||||||
l_error("Failed to initialize D-Bus");
|
l_error("Failed to initialize D-Bus");
|
||||||
|
Loading…
Reference in New Issue
Block a user