diff options
Diffstat (limited to 'managemon.c')
-rw-r--r-- | managemon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/managemon.c b/managemon.c index f9d545d4..5958e18e 100644 --- a/managemon.c +++ b/managemon.c @@ -680,6 +680,12 @@ void do_manager(struct supertype *container) read_sock(container); if (container->sock < 0 || socket_hup_requested) { + /* If this fails, we hope it already exists + * pid file lives in /var/run/mdadm/mdXX.pid + */ + mkdir("/var", 0600); + mkdir("/var/run", 0600); + mkdir("/var/run/mdadm", 0600); close(container->sock); container->sock = make_control_sock(container->devname); make_pidfile(container->devname, 0); |