[systemd-devel] Ordering for early initialization services
Reindl Harald
h.reindl at thelounge.net
Fri Mar 8 05:18:11 PST 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130308/5d2afc2a/attachment.pgp>
More information about the systemd-devel
mailing list