
Siguiente caso de uso: unidad A
y unidad B
son buscadas por objetivo T
. A
Conflictos de unidades B
. La unidad B
se inicia antes que la unidad A
. El sistema arranca en el objetivo T
.
Si entiendo eldocumentoscorrectamente, la unidad A
se detendrá B
en el momento en que se inicie. No impediré B
en absoluto que la unidad se ponga en marcha. ¿Es correcta mi suposición?
Respuesta1
Respondiendo a mi propia pregunta. Escribí una prueba simple para reflejar mi situación:
# Service B
[Unit]
Description=Hello World Service
#After=systemd-user-sessions.service
[Service]
Type=simple
ExecStart=/bin/sh -c "echo test > /tmp/test && sleep 10"
TimeoutStopSec=30
y
# Service A
[Unit]
Description=Hello World Service
After=B.service
Conflicts=B.service
[Service]
Type=simple
ExecStart=/bin/sh -c "echo test2 > /tmp/test2 && sleep 10"
TimeoutStopSec=30
y
# target T
[Unit]
Description=Foobar boot target
Wants=A.service B.service
En esta situación,servicio Bno se activará al iniciarobjetivo T