Am 05.10.2015 um 11:15 schrieb Martin Pitt: > Hello, > > Giuseppe Bilotta [2014-09-16 20:15 +0200]: >> My fstab includes the line >> >> labrador:/oneforall /oneforall nfs auto,exec 0 0 >> >> and the nfs share is automatically mounted when a network interface that >> can resolve `labrador` is brought up. I don't use NM nor wicd, so I >> bring the network interfaces up myself, typically with something like: >> >> sudo ifup wlan0=home >> >> However, when the network is brought down (manually, or automatically >> during system shutdown), the mountpoint is not unmounted, causing a >> number of issues. > > This sounds very similar to https://launchpad.net/bugs/1492546 . > ifupdown's /etc/init.d/networking (and also /etc/init/networking.conf) > call functions check_network_file_systems() and check_network_swap() > and don't tear down the interface(s) in the above situation. This also > applies to e. g. iscsi. > > But we don't do the same with the autogenerated ifup@.service -- that > always unconditionally calls "ifdown" on stopping. IMHO we should make > "systemctl stop ifup@ethX.service" a no-op at least during shutdown, > as stopping /etc/init.d/networking will stop them all anyway (or not, > if network file systems are being used). > > We could change the ExecStop= to something like > > /bin/sh -ec '[ "$(systemctl is-system-running)" = stopping ] || > /sbin/ifdown %I" > > Or we just declare that we don't support manual stops, and you are > supposed to run "sudo ifdown ethX" to stop an interface. This is also > reasonable as we consider ifup@.service more like an internal helper > unit, not an user-visible/actionable one. > > For sure I don't want to replicate the entire > check_network_file_systems()/check_network_swap() logic in > ifup@.service -- running this once on shutdown is bad enough :-) >
The ifup@.service unit file has DefaultDependencies=no and *no* Conflicts=shutdown.target, which means it should *not* be stopped on shutdown. This was done this way for exactly the reason you mention. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Pkg-systemd-maintainers mailing list Pkg-systemd-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers