[systemd-devel] Ordering for early initialization services

Umut Tezduyar umut at tezduyar.com
Fri Mar 8 05:20:49 PST 2013


Maybe bandwith wasn't the best example :) But my question is still valid.


On Fri, Mar 8, 2013 at 2:18 PM, Reindl Harald <h.reindl at thelounge.net>wrote:

>
>
> Am 08.03.2013 14:12, schrieb Umut Tezduyar:
> > To summarize, where are users encouraged to place their early boot up
> initialization services (ex: setting up the
> > bandwith on a NIC)?
>
>
> [root at rh:~]$ systemctl status bandwidth.service
> bandwidth.service - Traffic-Shaping
>           Loaded: loaded (/etc/systemd/system/bandwidth.service; enabled)
>           Active: active (exited) since Di 2013-03-05 12:38:49 CET; 3 days
> ago
>         Main PID: 16981 (code=exited, status=0/SUCCESS)
>           CGroup: name=systemd:/system/bandwidth.service
>
> Mär 05 12:38:49 rh.thelounge.net systemd[1]: Starting Traffic-Shaping
> Mär 05 12:38:49 rh.thelounge.net systemd[1]: Started Traffic-Shaping
>
>
> [root at rh:~]$ cat /etc/systemd/system/bandwidth.service
> [Unit]
> Description=Traffic-Shaping
> After=network.service network-bonding.service
> network-bonding-bridge.service network-wlan-bridge.service
>
> [Service]
> Type=oneshot
> RemainAfterExit=yes
>
> ExecStart=/sbin/tc qdisc add dev eth0 root handle 1: htb default 30 r2q
> 1000
> ExecStartPost=/sbin/tc class add dev eth0 parent 1: classid 1:2 htb rate
> 1000mbit
> ExecStartPost=/sbin/tc class add dev eth0 parent 1: classid 1:3 htb rate
> 90mbit
> ExecStartPost=/sbin/tc filter add dev eth0 protocol ip parent 1:0 prio 1
> u32 match ip dst 10.0.0.0/24 flowid 1:2
> ExecStartPost=/sbin/tc filter add dev eth0 protocol ip parent 1:0 prio 2
> u32 match ip dst 0.0.0.0/0 flowid 1:3
>
> ExecStartPost=/sbin/tc qdisc add dev eth1 root handle 1: htb default 30
> r2q 1000
> ExecStartPost=/sbin/tc class add dev eth1 parent 1: classid 1:2 htb rate
> 1000mbit
> ExecStartPost=/sbin/tc class add dev eth1 parent 1: classid 1:3 htb rate
> 90mbit
> ExecStartPost=/sbin/tc filter add dev eth1 protocol ip parent 1:0 prio 1
> u32 match ip dst 10.0.0.0/24 flowid 1:2
> ExecStartPost=/sbin/tc filter add dev eth1 protocol ip parent 1:0 prio 2
> u32 match ip dst 0.0.0.0/0 flowid 1:3
>
> ExecStop=/sbin/tc qdisc del dev eth0 root
> ExecStopPost=/sbin/tc qdisc del dev eth1 root
>
> [Install]
> WantedBy=multi-user.target
>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130308/6bc42978/attachment.html>


More information about the systemd-devel mailing list