Re: systemd network configuration

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



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/25/2012 10:58 PM, C Anthony Risinger wrote:

> 
> i modified it for you here: http://dpaste.com/775539/plain/
> 
Thanks! This approach seems to be fruitful, and of the network
daemons, only tor and freshclam are coming up without the network
successfully starting (I wouldn't have changed these service files;
are they okay?) but I'm having trouble.

This yields:

[root@atlanta system]# systemctl daemon-reload

[root@atlanta system]# systemctl start net.static\@eth0.service

         Starting [u] Static Interface [eth0]...

[FAILED] Failed to start [u] Static Interface [eth0].

         See 'systemctl status net.static@eth0.service' for details.

Job failed. See system journal and 'systemctl status' for details.

[root@atlanta system]# systemctl status net.static\@eth0.service

net.static@eth0.service - [u] Static Interface [eth0]

          Loaded: loaded (/etc/systemd/system/net.static@eth0.service;
enabled)
          Active: activating (auto-restart) (Result: exit-code) since
Thu, 26 Jul 2012 07:00:59 -070
0; 47s ago

        Main PID: 913 (code=exited, status=2)
          CGroup: name=systemd:/system/net.static@.service/eth0

[root@atlanta system]#

- From what I can see, it's getting an exit code even though the link is
coming up, addresses are being added, and routes created.

I noticed that you had the link up command placed after the address
add command and, assuming that the commands are executed in order from
top to bottom, reversed that order. So I now have:

[Unit]
Description=[u] Static Interface [%I]
StopWhenUnneeded=true
Wants=network.target
Before=network.target
BindTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
After=basic.target

[Service]
Type=oneshot
TimeoutSec=0
Restart=always
RestartSec=30
RemainAfterExit=yes
ExecStart=-/usr/sbin/ip link set eth0 up
ExecStart=-/usr/sbin/ip addr add 74.207.225.79/32 dev eth0
ExecStart=-/usr/sbin/ip addr add 74.207.227.150/32 dev eth0
ExecStart=-/usr/sbin/ip addr add 173.230.137.73/32 dev eth0
ExecStart=-/usr/sbin/ip addr add 173.230.137.76/32 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::f03c:91ff:fe96:64e2/64
dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7000/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7001/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7002/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7003/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7004/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7005/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7006/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7007/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7008/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7009/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:700a/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:700b/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:700c/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:700d/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:700e/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:700f/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7010/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7011/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7012/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7013/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7014/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7015/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7016/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7017/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7018/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:7019/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:701a/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:701b/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:701c/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:701d/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:701e/64 dev eth0
ExecStart=-/usr/sbin/ip -6 addr add 2600:3c02::02:701f/64 dev eth0
ExecStart=-/usr/sbin/ip route add default via 173.230.137.1
ExecStart=-/usr/sbin/ip -6 route add ::/0 via fe80::1
ExecStop=-/usr/sbin/ip link eth0 down

[Install]
Alias=sys-subsystem-net-devices-eth0.device.wants/net.static@eth0.service

Even with all those dashes in front of every command, it exits with a
code and is plainly unhappy. Which I find mystifying.

Thanks!
- -- 
David Benfell
benfell@xxxxxxxxxxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJQEVCCAAoJELT202JKF+xpUPUP/RBMnzHpdhWwjQxL9mmNBMbj
6KQ4AC94DeQfWgsplRE5xqcOt+vmg+7CWW496iTGSUiz2Bg2n6P0uorOOLhhESEP
PDGVEd270hhWa0BmmF7klpAZoad8QMRkk/JxU0sexLsPBk/dw3PCCMMm5QinkZKg
bBeyR4WLzNcKJ14yehab5j1CteR9mcHcoZUH8B0MxfmfTploIqBvuvacE5BksLVf
qRYoHQ3gn1Pp+flEGyn+nTuUH2Jpw/w6na+7FUcY25POvjYBtBw1FjmUqcxVie/y
1Q6CxzwgJHpE92saCBbBTa2yuVQunsmrX9BgJJgG9YBIgCONEj7ILq0lGPA8c5mZ
ehfbVWFfAuN/6UPwN0y9Ll+P4VXoLCR8J64MaC8cibToIPbSZu4Z7KPNjptRz0aM
aIiYdoI9vyret1g/0BIpjM5fqaDWUyXYYE/hx+5JeTuMte38XXniJkHOdfNUU1HA
qwEBOZDeIW70qbVPzk7x3xc+cjmnBemZ//tcSXsKypLA1z/1m+sNTyiOxnORRP3G
wXgVml1LhDvWjqj8ONIGEN/FjkfbhxMdvc7ETzkGwqkxdSVboLlU+aX7QWQaPXY/
mviynwIj7+3ZoN7xHurAc0HUDumJj4iT65po8gbDzBgdkSHTi5WpkVcJqdQ7T5mV
Eb6uMbXK6FPLPFJSNAkM
=LGbs
-----END PGP SIGNATURE-----

[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