load-fragment: reset fragment_path if we couldn't find a unit file for it
This commit is contained in:
parent
2e7485f021
commit
6ccb1b4429
2
fixme
2
fixme
|
@ -109,8 +109,6 @@
|
||||||
|
|
||||||
* (null) dependency bug
|
* (null) dependency bug
|
||||||
|
|
||||||
* f21781d57f7e012c1d576dfd8c30b411014c5a88
|
|
||||||
|
|
||||||
* d /var/run/screen 0755 root utmp
|
* d /var/run/screen 0755 root utmp
|
||||||
|
|
||||||
External:
|
External:
|
||||||
|
|
|
@ -1846,10 +1846,20 @@ int unit_load_fragment(Unit *u) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* And now, try looking for it under the suggested (originally linked) path */
|
/* And now, try looking for it under the suggested (originally linked) path */
|
||||||
if (u->meta.load_state == UNIT_STUB && u->meta.fragment_path)
|
if (u->meta.load_state == UNIT_STUB && u->meta.fragment_path) {
|
||||||
|
|
||||||
if ((r = load_from_path(u, u->meta.fragment_path)) < 0)
|
if ((r = load_from_path(u, u->meta.fragment_path)) < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
if (u->meta.load_state == UNIT_STUB) {
|
||||||
|
/* Hmm, this didn't work? Then let's get rid
|
||||||
|
* of the fragment path stored for us, so that
|
||||||
|
* we don't point to an invalid location. */
|
||||||
|
free(u->meta.fragment_path);
|
||||||
|
u->meta.fragment_path = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Look for a template */
|
/* Look for a template */
|
||||||
if (u->meta.load_state == UNIT_STUB && u->meta.instance) {
|
if (u->meta.load_state == UNIT_STUB && u->meta.instance) {
|
||||||
char *k;
|
char *k;
|
||||||
|
|
Loading…
Reference in New Issue