mirror of
https://github.com/troglobit/finit.git
synced 2026-10-09 16:50:59 +07:00
Fix touch-reload regression from 3bb1e41
When reloading we check if service .conf files have been modified since
the last time we read them. In 3bb1e41 we changed it so we load only
the enabled/*.conf files, which led to our no longer properly detecting
changed files since we monitor changes in what the symlinks point to.
This patch fixes that by checking the target for changes.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+11
-3
@@ -792,13 +792,21 @@ int conf_any_change(void)
|
||||
|
||||
int conf_changed(char *file)
|
||||
{
|
||||
int rc = 0;
|
||||
char *rp;
|
||||
|
||||
if (!file)
|
||||
return 0;
|
||||
|
||||
if (conf_find(file))
|
||||
return 1;
|
||||
rp = realpath(file, NULL);
|
||||
if (!rp)
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
if (conf_find(rp))
|
||||
rc = 1;
|
||||
free(rp);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void conf_cb(uev_t *w, void *arg, int events)
|
||||
|
||||
Reference in New Issue
Block a user