On 22.12.2013 18:49, Bruce Dubbs wrote: > Armin K. wrote: >> On 12/22/2013 06:17 PM, Armin K. wrote: >>> On 12/22/2013 04:59 PM, Pierre Labastie wrote: >>>> Hi, >>>> >>>> I think jhalfs is now usable for building the systemd branch of LFS. Be >>>> careful that the configuration files indicated at the end of the build are >>>> for >>>> LFS trunk, and that they are different for systemd. >>>> >>>> I have a question for systemd gurus: when you use "systemctl enable" does >>>> is >>>> do more than linking the right files to the configuration dir? >>>> >>>> If not, why not use ln -s commands in chapter 7 instead? >>>> >>>> Regards >>>> Pierre >>>> >>> >>> Because it's the systemd way. It might create more than one link in more >>> than one (sub)directory of /etc/systemd/system. >>> >> >> Also, compare this one >> >> ln -s /lib/systemd/system/[email protected] >> /etc/systemd/system/multi-user.target.wants/[email protected] >> >> with systemctl enable ifupdown@enp2s1 >> >> This is even simple one. There are more complicated units like: >> >> systemctl enable NetworkManager >> >> ln -s '/lib/systemd/system/NetworkManager.service' >> '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service' >> ln -s '/lib/systemd/system/NetworkManager.service' >> '/etc/systemd/system/multi-user.target.wants/NetworkManager.service' >> ln -s '/lib/systemd/system/NetworkManager-dispatcher.service' >> '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service' >> >> One short command beats 4 of them. > > This brings up a question. How does systemd handle bringing up a bridge > and attaching an ethernet connection? In BLFS we do: > > ONBOOT=yes > IFACE=br0 > SERVICE="bridge ipv4-static" # Space separated > IP=192.168.0.22 > GATEWAY=192.168.0.1 > PREFIX=24 > BROADCAST=192.168.0.255 > CHECK_LINK=no # Don't check before bridge is created > STP=no # Spanning tree protocol, default no > INTERFACE_COMPONENTS="eth0" # Add to IFACE, space separated devices > IP_FORWARD=true > > and the ifup, bridge, and ipv4-static scripts handle it. How is this > done with systemd? > > -- Bruce >
Not sure, systemd runs "/sbin/ifup interface" at boot, but requires the "/etc/sysconfig/ifconfig.interface" and interface in /sys/class/net or whatever to be present in order to start it. We might need different unit to configure bridge, and that one might need to have a dependency on classic ifupdown service that configures the interface, so the bridge configuration is started after the interface has been configured properly. I am curious is this how lfs does it? First, it brings up the interface that's being bridged, then it creates the bridge? -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
