Re: Systemd and Custom Early Init Script

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

 



Sorry, I missed this mail somehow.

On Tue, Feb 5, 2013 at 3:49 PM, Gordan Bobic <gordan@xxxxxxxxxx> wrote:
> Yes, I got that part mostly figured out:
>
> My custom service is:
>
> ======
> [Unit]
> Description=pciehp disable
> DefaultDependencies=no
> After=local-fs.target
>
> [Service]
> Type=oneshot
> ExecStart=echo -n 0000:00:1c.0:pcie04 >
> /sys/bus/pci_express/drivers/pciehp/unbind

I don't think systemd will execute shell fragments like this.  You
need to wrap it in `/bin/bash -c 'command'`.  Perhaps that's why it's
not working.

Also, After=local-fs.target isn't strictly necessary in your case, you
can be sure dracut has mounted root ro at least and that systemd has
mounted /sys if your unit is being run at all.  Dropping it will make
sure it gets executed as early as possible.

> ======

Speaking of dracut, if systemd can't do this early enough, you could
try doing it from the initramfs.

-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