[systemd-devel] systemctl enable myunit.service ---> Failed to execute operation: Invalid argument (bobafetthotmail)

Chaiken, Alison alison at she-devel.com
Tue Dec 29 12:16:33 PST 2015


bobafetthotmail <starshipeleven at hotmail.it> writes:
> Finally found a workaround, bypassing systemctl.

[ . . . ]

> ln -s /etc/folder2ram/folder2ram.service
> /lib/systemd/system/local-fs.target.wants/folder2ram.service

[ . . . ]

> On 12/13/2015 07:09 PM, bobafetthotmail wrote: Hi, it's me again. :)
> 
> I made a systemd unit called "folder2ram.service", with these
> contents:
> 
> ------
> [Unit]
> Description=folder2ram systemd service
> 
> [Service]
> Type=oneshot
> ExecStart=/sbin/folder2ram -mountall
> ExecStop=/sbin/folder2ram -umountall
> RemainAfterExit=yes
> 
> [Install]
> WantedBy=multi-user.target

I'm curious: did you try

    WantedBy=local-fs.target

in your unit file rather than multi-user.target?   Once you've created 
the symlink by hand, does 'systemctl disable' then work?

FWIW, I've had no problem creating my own unit files and enabling them 
on Jessie.

Best wishes,
Alison

---
Alison Chaiken                      alison at she-devel.com, 650-279-5600
http://{ she-devel.com, exerciseforthereader.org }
"Democracy is the original crowd-sourcing." -- Philip Tetlock,
_Superforecasting_


More information about the systemd-devel mailing list