etcnet-0.9.7-alt0.M41.1 Example: at the beginning, everything is down: [root@localhost net]# ifconfig [root@localhost net]# the configuration is to bring up the iface "lan" in the profile "Auto": [root@localhost net]# ls ifaces/lan/ options options#Auto [root@localhost net]# cat ifaces/lan/options TYPE=eth [root@localhost net]# cat ifaces/lan/options#Auto DISABLED=no TYPE=eth MODULE=sky2 NM_CONTROLLED=no # I have a reasonable self-configuring default: #BOOTPROTO=dhcp,ipv4ll [root@localhost net]# cat ifaces/default/options # This file doesn't contain comments any more, refer to etcnet-options(5) # manpage for detailed options description. DISABLED=yes BOOTPROTO=static ONBOOT=yes USE_HOTPLUG=no USE_PCMCIA=no CONFIG_IPV4=yes CONFIG_IPV6=no CONFIG_IPX=no CONFIG_QOS=yes CONFIG_WIRELESS=no CONFIG_FW=no KEEP_DOWN=no DONT_FLUSH=no IFUP_CHILDREN=no IFUP_PARENTS=yes IFDOWN_CHILDREN=yes IFDOWN_PARENTS=no DHCP_ARGS='-m 1' NM_CONTROLLED=yes [root@localhost net]# cat ifaces/default/options-eth # This file doesn't contain comments any more. # For detailed options description refer to etcnet-options(5) manpage, # section 'Ethernet options'. USE_IFPLUGD=yes # But is ifplugd suitable for wireless?! PERSISTENT_IFPLUGD=no IFPLUGD_EXTRA_ARGS='--delay-up=0 --delay-down=10' LINKDETECT=auto LINKDELAY=5 CONFIG_WIRELESS=yes AUTO_BROADCAST=yes BOOTPROTO=dhcp-ipv4ll [root@localhost net]# l iftab* -rw-r--r-- 1 root root 407 Dec 31 18:42 iftab [root@localhost net]# cat iftab # -*- conf-space -*- # (eth0 is evil!) lan driver sky2 [root@localhost net]# then, I use the profile "Auto": [root@localhost net]# service network startwith Auto Computing interface groups: .. 2 interfaces found Starting group 0/virtual (1 interfaces) Starting lo: .....OK Starting group 1/realphys (1 interfaces) Starting lan: ..OK Processing /etc/net/vlantab: empty. [root@localhost net]# ifconfig lan Link encap:Ethernet HWaddr 00:13:A9:91:2A:52 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:223185 errors:0 dropped:0 overruns:0 frame:0 TX packets:127708 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:333227613 (317.7 MiB) TX bytes:7361514 (7.0 MiB) Interrupt:17 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) [root@localhost net]# now, I want to stop the network: [root@localhost net]# service network stop Computing interface groups: . 1 interfaces found Processing /etc/net/vlantab: empty. Stopping group 0/virtual (1 interfaces) Stopping lo: .OK [root@localhost net]# ifconfig lan Link encap:Ethernet HWaddr 00:13:A9:91:2A:52 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:223185 errors:0 dropped:0 overruns:0 frame:0 TX packets:127708 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:333227613 (317.7 MiB) TX bytes:7361514 (7.0 MiB) Interrupt:17 [root@localhost net]# Result: the iface which is actually up and has been brought up by etcnet itslef, is not brought down! Expected: all ifaces which are up or at least those ifaces which have been brought up by etcnet are brought down by "service network stop". Workaround: use the ugly "stopwith": [root@localhost net]# service network stopwith Auto Computing interface groups: .. 2 interfaces found Processing /etc/net/vlantab: empty. Stopping group 1/realphys (1 interfaces) Stopping lan: ....OK Stopping group 0/virtual (1 interfaces) Stopping lo: OK [root@localhost net]# ifconfig [root@localhost net]# (But that's very illogical: I mustn't remember the name of the profile which was used. Also: the config files might have changed between the "startwith" invocation and "stop". So, etcnet should care about bringing down the actual ifaces.)
Related reports: https://bugzilla.altlinux.org/show_bug.cgi?id=9683 (doesn't bring down an iface declared DISABLED (instead of my intention to stop the network)) https://bugzilla.altlinux.org/show_bug.cgi?id=16910 (doesn't bring down an iface after a change in the configuration which makes the iface unknown/disbaled)
I think that a general rule could be assumed (such that most users will agree with it): if the intended state of a certain iface in the new state of the network is down (it is declared disabled in the new profile, or the whole network is brought down), then it must be brought down. An "exception"/different case might be the case when an iface is unknown in the new profile/configuration: then there is simply no intention stated about it, and it can be left up.
В 4.1/branch исправления не будут вноситься уже технически (заглушена очередь на сборку), поэтому прошу ошибки, актуальные для sisyphus/p7/t7, перевесить на текущие ветки или сизиф.