1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

job: make it possible to wait for devices to be unplugged

This commit is contained in:
Lennart Poettering 2010-11-14 21:57:10 +01:00
parent 7611630462
commit 57339f47f1
3 changed files with 10 additions and 2 deletions

2
TODO
View File

@ -86,7 +86,7 @@ Pre v12:
* fix hotplug transactions
* make it possible to wait for device unplug, i.e. issue "stop" on devices
* plymouth agent start loop
External:

View File

@ -385,6 +385,9 @@ int job_run_and_invalidate(Job *j) {
case JOB_START:
r = unit_start(j->unit);
/* If this unit cannot be started, then simply
* wait */
if (r == -EBADR)
r = 0;
break;
@ -402,6 +405,11 @@ int job_run_and_invalidate(Job *j) {
case JOB_STOP:
r = unit_stop(j->unit);
/* If this unit cannot stopped, then simply
* wait. */
if (r == -EBADR)
r = 0;
break;
case JOB_RELOAD:

View File

@ -1386,9 +1386,9 @@ bool unit_job_is_applicable(Unit *u, JobType j) {
case JOB_VERIFY_ACTIVE:
case JOB_START:
case JOB_STOP:
return true;
case JOB_STOP:
case JOB_RESTART:
case JOB_TRY_RESTART:
return unit_can_start(u);