[systemd-devel] ConditionKernelCommandLine not working?
Albert Strasheim
fullung at gmail.com
Tue Aug 16 10:53:06 PDT 2011
Hello again
My previous example confused the issue by mentioning fedora-autorelabal.service.
With the following in /etc/systemd/system/foobar.service:
[Unit]
Description=foobar
ConditionKernelCommandLine=foo=bar
[Service]
ExecStart=/bin/true
Type=oneshot
TimeoutSec=0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
I get the following after booting:
# dmesg | grep foo
[ 0.000000] Command line: foo=bar console=ttyS0,38400 systemd.log_level=debug
[ 0.000000] Kernel command line: foo=bar console=ttyS0,38400
systemd.log_level=debug
[ 5.137548] systemd[1]: Installed new job foobar.service/start as 84
[ 6.551148] systemd[1]: Starting of foobar.service requested but
condition failed. Ignoring.
[ 6.556179] systemd[1]: Job foobar.service/start finished, result=done
Regards
Albert
P. S. I'm running systemd-26-5.fc15.x86_64. I tried to test with
systemd v33, but the systemctl enable problem mentioned elsewhere on
this list prevented me from setting up my environment.
On Mon, Aug 15, 2011 at 1:27 PM, Albert Strasheim <fullung at gmail.com> wrote:
> Does ConditionKernelCommandLine work in systemd-26-5.fc15.x86_64?
>
> I've tested it with my own units and with the Fedora
> fedora-autorelabel.service, but no luck.
More information about the systemd-devel
mailing list