You are not logged in.
Hi!
Today i made my own hibernate-script-cleanup.service (because i use hibernating a lot, and i'm using TOI).
Well, here it is
[Unit]
Description=Check tuxonice swap images and kill them in case they're corrupted
Wants=local-fs.target
Before=swap.target
[Service]
Type=oneshot
ExecStart=/etc/hibernate-cleanup.sh start
[Install]
WantedBy=multi-user.targetBut my journalctl shows this kind of output:
journalctl | grep cycle
dic 16 12:18:18 arch systemd[1]: Found ordering cycle on basic.target/start
dic 16 12:18:18 arch systemd[1]: Walked on cycle path to sysinit.target/start
dic 16 12:18:18 arch systemd[1]: Walked on cycle path to swap.target/start
dic 16 12:18:18 arch systemd[1]: Walked on cycle path to hibernate-cleanup.service/start
dic 16 12:18:18 arch systemd[1]: Walked on cycle path to basic.target/start
dic 16 12:18:18 arch systemd[1]: Breaking ordering cycle by deleting job swap.target/startWhat does it mean? Is it right? I can't understand whether my script is working or not.
Thank you and sorry for the probably stupid question.
EDIT: for completeness (i forgot)
systemctl status hibernate-cleanup.service
hibernate-cleanup.service - Check tuxonice swap images and kill them in case they're corrupted
Loaded: loaded (/etc/systemd/system/hibernate-cleanup.service; enabled)
Active: inactive (dead) since dom, 2012-12-16 13:30:42 CET; 1min 0s ago
Process: 115 ExecStart=/etc/hibernate-cleanup.sh start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/hibernate-cleanup.service
dic 16 13:30:40 arch systemd[1]: Starting Check tuxonice swap images and kill them in case they're corrupted...
dic 16 13:30:42 arch hibernate-cleanup.sh[115]: Invalidating stale software suspend images... done.
dic 16 13:30:42 arch systemd[1]: Started Check tuxonice swap images and kill them in case they're corrupted.and
journalctl | grep hibernate
dic 16 13:30:40 arch systemd[1]: Walked on cycle path to hibernate-cleanup.service/start
dic 16 13:30:42 arch hibernate-cleanup.sh[115]: Invalidating stale software suspend images... done.Last edited by nierro (2012-12-16 22:55:36)
Offline
If you want this to run in the early part of the boot, you need to set "DefaultDependencies=false" in section Unit. Otherwise it will implicitly depend on basic.target, which will make a dependency loop in this case. See systemd.unit(5) for a longer explanation of this option.
Offline
Oh, really thanks. And sorry, i read systemd.unit, but only the part regarding the unit config files, to find out what "After=", "Wants=", "Before=" and other options mean.
Thank you very much!
Offline