On 07/23/12 20:10, Manolo Martínez wrote:
Hello,

I've decided to try systemd and see for myself. Anyway, I need to remove
a module before shutdown, which rc.local.shutdown did nicely for me.

I know there is an initscripts-systemd packages that would allow me to
keep using rc.local.shutdown, but the wiki discourages its use and recommends 
instead
using systemd native configuration files.

Hence my question: what's the systemd native way to do stuff (in my
case, remove a module) before shutdown?

Thanks,
Manolo


Perhaps something like this?

[Unit]
Description=Unload module before shutdown
Before=shutdown.target

[Service]
Type=oneshot
ExecStart=/usr/bin/rmmod modulename

[Install]
WantedBy=multi-user.target

Haven't tried it, might not work, no guarantees, etc..

Reply via email to