BE CONSIDERATE:
We'd like to keep differences between the distributions
- minimal. This both simplifies our maintainance work, as well
+ minimal. This both simplifies our maintenance work, as well
as it helps administrators to move from one distribution to
another.
* use setproctitle() when forking, before exec() (waiting for (PR_SET_PROCTITLE_AREA to enter the kernel)
-* s/maintainance/maintenance/
-
* follow property change dbus spec
Regularly:
[AUTOMOUNT_DEAD] = UNIT_INACTIVE,
[AUTOMOUNT_WAITING] = UNIT_ACTIVE,
[AUTOMOUNT_RUNNING] = UNIT_ACTIVE,
- [AUTOMOUNT_MAINTAINANCE] = UNIT_INACTIVE,
+ [AUTOMOUNT_MAINTENANCE] = UNIT_INACTIVE,
};
static int open_dev_autofs(Manager *m);
if (!success)
a->failure = true;
- automount_set_state(a, a->failure ? AUTOMOUNT_MAINTAINANCE : AUTOMOUNT_DEAD);
+ automount_set_state(a, a->failure ? AUTOMOUNT_MAINTENANCE : AUTOMOUNT_DEAD);
}
static int open_dev_autofs(Manager *m) {
assert(a);
- assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_MAINTAINANCE);
+ assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_MAINTENANCE);
if (path_is_mount_point(a->where)) {
log_error("Path %s is already a mount point, refusing start for %s", a->where, u->meta.id);
[AUTOMOUNT_DEAD] = "dead",
[AUTOMOUNT_WAITING] = "waiting",
[AUTOMOUNT_RUNNING] = "running",
- [AUTOMOUNT_MAINTAINANCE] = "maintainance"
+ [AUTOMOUNT_MAINTENANCE] = "maintenance"
};
DEFINE_STRING_TABLE_LOOKUP(automount_state, AutomountState);
AUTOMOUNT_DEAD,
AUTOMOUNT_WAITING,
AUTOMOUNT_RUNNING,
- AUTOMOUNT_MAINTAINANCE,
+ AUTOMOUNT_MAINTENANCE,
_AUTOMOUNT_STATE_MAX,
_AUTOMOUNT_STATE_INVALID = -1
} AutomountState;
[MOUNT_REMOUNTING_SIGKILL] = UNIT_ACTIVE_RELOADING,
[MOUNT_UNMOUNTING_SIGTERM] = UNIT_DEACTIVATING,
[MOUNT_UNMOUNTING_SIGKILL] = UNIT_DEACTIVATING,
- [MOUNT_MAINTAINANCE] = UNIT_INACTIVE,
+ [MOUNT_MAINTENANCE] = UNIT_INACTIVE,
};
static void mount_init(Unit *u) {
state == MOUNT_REMOUNTING_SIGKILL ||
state == MOUNT_UNMOUNTING_SIGTERM ||
state == MOUNT_UNMOUNTING_SIGKILL ||
- state == MOUNT_MAINTAINANCE)
+ state == MOUNT_MAINTENANCE)
mount_notify_automount(m, -ENODEV);
if (state != old_state)
if (!success)
m->failure = true;
- mount_set_state(m, m->failure ? MOUNT_MAINTAINANCE : MOUNT_DEAD);
+ mount_set_state(m, m->failure ? MOUNT_MAINTENANCE : MOUNT_DEAD);
}
static void mount_enter_mounted(Mount *m, bool success) {
m->state == MOUNT_MOUNTING_SIGKILL)
return 0;
- assert(m->state == MOUNT_DEAD || m->state == MOUNT_MAINTAINANCE);
+ assert(m->state == MOUNT_DEAD || m->state == MOUNT_MAINTENANCE);
m->failure = false;
mount_enter_mounting(m);
switch (mount->state) {
case MOUNT_DEAD:
- case MOUNT_MAINTAINANCE:
+ case MOUNT_MAINTENANCE:
mount_enter_mounted(mount, true);
break;
[MOUNT_REMOUNTING_SIGKILL] = "remounting-sigkill",
[MOUNT_UNMOUNTING_SIGTERM] = "unmounting-sigterm",
[MOUNT_UNMOUNTING_SIGKILL] = "unmounting-sigkill",
- [MOUNT_MAINTAINANCE] = "maintainance"
+ [MOUNT_MAINTENANCE] = "maintenance"
};
DEFINE_STRING_TABLE_LOOKUP(mount_state, MountState);
MOUNT_REMOUNTING_SIGKILL,
MOUNT_UNMOUNTING_SIGTERM,
MOUNT_UNMOUNTING_SIGKILL,
- MOUNT_MAINTAINANCE,
+ MOUNT_MAINTENANCE,
_MOUNT_STATE_MAX,
_MOUNT_STATE_INVALID = -1
} MountState;
[PATH_DEAD] = UNIT_INACTIVE,
[PATH_WAITING] = UNIT_ACTIVE,
[PATH_RUNNING] = UNIT_ACTIVE,
- [PATH_MAINTAINANCE] = UNIT_INACTIVE
+ [PATH_MAINTENANCE] = UNIT_INACTIVE
};
static void path_done(Unit *u) {
if (!success)
p->failure = true;
- path_set_state(p, p->failure ? PATH_MAINTAINANCE : PATH_DEAD);
+ path_set_state(p, p->failure ? PATH_MAINTENANCE : PATH_DEAD);
}
static void path_enter_running(Path *p) {
Path *p = PATH(u);
assert(p);
- assert(p->state == PATH_DEAD || p->state == PATH_MAINTAINANCE);
+ assert(p->state == PATH_DEAD || p->state == PATH_MAINTENANCE);
if (p->unit->meta.load_state != UNIT_LOADED)
return -ENOENT;
[PATH_DEAD] = "dead",
[PATH_WAITING] = "waiting",
[PATH_RUNNING] = "running",
- [PATH_MAINTAINANCE] = "maintainance"
+ [PATH_MAINTENANCE] = "maintenance"
};
DEFINE_STRING_TABLE_LOOKUP(path_state, PathState);
PATH_DEAD,
PATH_WAITING,
PATH_RUNNING,
- PATH_MAINTAINANCE,
+ PATH_MAINTENANCE,
_PATH_STATE_MAX,
_PATH_STATE_INVALID = -1
} PathState;
[SERVICE_STOP_POST] = UNIT_DEACTIVATING,
[SERVICE_FINAL_SIGTERM] = UNIT_DEACTIVATING,
[SERVICE_FINAL_SIGKILL] = UNIT_DEACTIVATING,
- [SERVICE_MAINTAINANCE] = UNIT_INACTIVE,
+ [SERVICE_MAINTENANCE] = UNIT_INACTIVE,
[SERVICE_AUTO_RESTART] = UNIT_ACTIVATING,
};
state == SERVICE_STOP_POST ||
state == SERVICE_FINAL_SIGTERM ||
state == SERVICE_FINAL_SIGKILL ||
- state == SERVICE_MAINTAINANCE ||
+ state == SERVICE_MAINTENANCE ||
state == SERVICE_AUTO_RESTART)
service_notify_sockets_dead(s);
service_set_state(s, SERVICE_AUTO_RESTART);
} else
- service_set_state(s, s->failure ? SERVICE_MAINTAINANCE : SERVICE_DEAD);
+ service_set_state(s, s->failure ? SERVICE_MAINTENANCE : SERVICE_DEAD);
return;
s->state == SERVICE_START_POST)
return 0;
- assert(s->state == SERVICE_DEAD || s->state == SERVICE_MAINTAINANCE || s->state == SERVICE_AUTO_RESTART);
+ assert(s->state == SERVICE_DEAD || s->state == SERVICE_MAINTENANCE || s->state == SERVICE_AUTO_RESTART);
/* Make sure we don't enter a busy loop of some kind. */
if (!ratelimit_test(&s->ratelimit)) {
break;
case SERVICE_FINAL_SIGKILL:
- log_warning("%s still around after SIGKILL (2). Entering maintainance mode.", u->meta.id);
+ log_warning("%s still around after SIGKILL (2). Entering maintenance mode.", u->meta.id);
service_enter_dead(s, false, true);
break;
[SERVICE_STOP_POST] = "stop-post",
[SERVICE_FINAL_SIGTERM] = "final-sigterm",
[SERVICE_FINAL_SIGKILL] = "final-sigkill",
- [SERVICE_MAINTAINANCE] = "maintainance",
+ [SERVICE_MAINTENANCE] = "maintenance",
[SERVICE_AUTO_RESTART] = "auto-restart",
};
SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, /* In case the STOP_POST executable hangs, we shoot that down, too */
SERVICE_FINAL_SIGKILL,
- SERVICE_MAINTAINANCE,
+ SERVICE_MAINTENANCE,
SERVICE_AUTO_RESTART,
_SERVICE_STATE_MAX,
_SERVICE_STATE_INVALID = -1
[SOCKET_STOP_POST] = UNIT_DEACTIVATING,
[SOCKET_FINAL_SIGTERM] = UNIT_DEACTIVATING,
[SOCKET_FINAL_SIGKILL] = UNIT_DEACTIVATING,
- [SOCKET_MAINTAINANCE] = UNIT_INACTIVE,
+ [SOCKET_MAINTENANCE] = UNIT_INACTIVE,
};
static void socket_init(Unit *u) {
if (!success)
s->failure = true;
- socket_set_state(s, s->failure ? SOCKET_MAINTAINANCE : SOCKET_DEAD);
+ socket_set_state(s, s->failure ? SOCKET_MAINTENANCE : SOCKET_DEAD);
}
static void socket_enter_signal(Socket *s, SocketState state, bool success);
/* If the service is alredy actvie we cannot start the
* socket */
if (s->service->state != SERVICE_DEAD &&
- s->service->state != SERVICE_MAINTAINANCE &&
+ s->service->state != SERVICE_MAINTENANCE &&
s->service->state != SERVICE_AUTO_RESTART)
return -EBUSY;
}
- assert(s->state == SOCKET_DEAD || s->state == SOCKET_MAINTAINANCE);
+ assert(s->state == SOCKET_DEAD || s->state == SOCKET_MAINTENANCE);
s->failure = false;
socket_enter_start_pre(s);
break;
case SOCKET_FINAL_SIGKILL:
- log_warning("%s still around after SIGKILL (2). Entering maintainance mode.", u->meta.id);
+ log_warning("%s still around after SIGKILL (2). Entering maintenance mode.", u->meta.id);
socket_enter_dead(s, false);
break;
[SOCKET_STOP_POST] = "stop-post",
[SOCKET_FINAL_SIGTERM] = "final-sigterm",
[SOCKET_FINAL_SIGKILL] = "final-sigkill",
- [SOCKET_MAINTAINANCE] = "maintainance"
+ [SOCKET_MAINTENANCE] = "maintenance"
};
DEFINE_STRING_TABLE_LOOKUP(socket_state, SocketState);
SOCKET_STOP_POST,
SOCKET_FINAL_SIGTERM,
SOCKET_FINAL_SIGKILL,
- SOCKET_MAINTAINANCE,
+ SOCKET_MAINTENANCE,
_SOCKET_STATE_MAX,
_SOCKET_STATE_INVALID = -1
} SocketState;
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
[SWAP_ACTIVE] = UNIT_ACTIVE,
- [SWAP_MAINTAINANCE] = UNIT_INACTIVE
+ [SWAP_MAINTENANCE] = UNIT_INACTIVE
};
static void swap_init(Unit *u) {
static void swap_enter_dead(Swap *s, bool success) {
assert(s);
- swap_set_state(s, success ? SWAP_MAINTAINANCE : SWAP_DEAD);
+ swap_set_state(s, success ? SWAP_MAINTENANCE : SWAP_DEAD);
}
static int swap_start(Unit *u) {
int r;
assert(s);
- assert(s->state == SWAP_DEAD || s->state == SWAP_MAINTAINANCE);
+ assert(s->state == SWAP_DEAD || s->state == SWAP_MAINTENANCE);
if (s->from_fragment)
priority = s->parameters_fragment.priority;
static const char* const swap_state_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = "dead",
[SWAP_ACTIVE] = "active",
- [SWAP_MAINTAINANCE] = "maintainance"
+ [SWAP_MAINTENANCE] = "maintenance"
};
DEFINE_STRING_TABLE_LOOKUP(swap_state, SwapState);
typedef enum SwapState {
SWAP_DEAD,
SWAP_ACTIVE,
- SWAP_MAINTAINANCE,
+ SWAP_MAINTENANCE,
_SWAP_STATE_MAX,
_SWAP_STATE_INVALID = -1
} SwapState;
[TIMER_WAITING] = UNIT_ACTIVE,
[TIMER_RUNNING] = UNIT_ACTIVE,
[TIMER_ELAPSED] = UNIT_ACTIVE,
- [TIMER_MAINTAINANCE] = UNIT_INACTIVE
+ [TIMER_MAINTENANCE] = UNIT_INACTIVE
};
static void timer_init(Unit *u) {
if (!success)
t->failure = true;
- timer_set_state(t, t->failure ? TIMER_MAINTAINANCE : TIMER_DEAD);
+ timer_set_state(t, t->failure ? TIMER_MAINTENANCE : TIMER_DEAD);
}
static void timer_enter_waiting(Timer *t, bool initial) {
Timer *t = TIMER(u);
assert(t);
- assert(t->state == TIMER_DEAD || t->state == TIMER_MAINTAINANCE);
+ assert(t->state == TIMER_DEAD || t->state == TIMER_MAINTENANCE);
if (t->unit->meta.load_state != UNIT_LOADED)
return -ENOENT;
break;
case TIMER_DEAD:
- case TIMER_MAINTAINANCE:
+ case TIMER_MAINTENANCE:
;
default:
[TIMER_WAITING] = "waiting",
[TIMER_RUNNING] = "running",
[TIMER_ELAPSED] = "elapsed",
- [TIMER_MAINTAINANCE] = "maintainance"
+ [TIMER_MAINTENANCE] = "maintenance"
};
DEFINE_STRING_TABLE_LOOKUP(timer_state, TimerState);
TIMER_WAITING,
TIMER_RUNNING,
TIMER_ELAPSED,
- TIMER_MAINTAINANCE,
+ TIMER_MAINTENANCE,
_TIMER_STATE_MAX,
_TIMER_STATE_INVALID = -1
} TimerState;