Re: rc.local.shutdown equivalent in systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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..


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux