Re: Feedback: systemd poweroff fixfiles is it possible?

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

 



On Sun, Jan 22, 2012 at 6:38 AM, Frank Murphy <frankly3d@xxxxxxxxx> wrote:
> Looking for feedback
>
> I havn't seen anything in
> https://fedoraproject.org/wiki/Systemd
>
> Google not much help.
>
> but I would like
> "fixfiles onboot"
> to run just before poweroff both cli\gui
>
> not sure how
> "Requires=fixfiles"
> "After="fixfiles onboot"
> would work out.
>
>
> [Unit]
> Description=Power-Off
> DefaultDependencies=no
> Requires=shutdown.target umount.target final.target /usr/bin/fixfiles
> After=shutdown.target umount.target final.target "fixfiles -q onboot"
> .include /usr/lib/systemd/system/poweroff.service

For starters, you can't add arbitrary commands to systemd unit files
like that; you'd have to write a unit file.  Secondly, you don't need
to mess with poweroff.service.

Drop this in /etc/systemd/system/fixfiles.service or such and it
should do the trick:

[Unit]
Name=Fix SELinux Contexts on Shutdown
DefaultDependencies=no
After=local-fs.target sysinit.target
Before=poweroff.service reboot.service halt.service

[Service]
Type=oneshot
ExecStart=/usr/bin/fixfiles

> Would use a crontab,
> but not sure how
> "@poweroff fixfiles onboot"
> could be worked in, as not valid as a command

-T.C.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux