diff options
author | 2005-11-23 17:50:32 +0000 | |
---|---|---|
committer | 2005-11-23 17:50:32 +0000 | |
commit | 10ded7bd84d2f6d2eb6733bf865be68305d7415e (patch) | |
tree | cc1ebf317f80e738e00d58cbb0b9922016e1c719 | |
parent | Uberlord did a commit right after my, so i'm syncing it again; but this time ... (diff) | |
download | baselayout-vserver-10ded7bd84d2f6d2eb6733bf865be68305d7415e.tar.gz baselayout-vserver-10ded7bd84d2f6d2eb6733bf865be68305d7415e.tar.bz2 baselayout-vserver-10ded7bd84d2f6d2eb6733bf865be68305d7415e.zip |
baselayout folks just did a _pre11 so I'm syncing again (to 1626 this time).
svn path=/baselayout-vserver/trunk/; revision=91
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ChangeLog.vserver | 11 | ||||
-rw-r--r-- | etc/conf.d/rc | 7 | ||||
-rw-r--r-- | net-scripts/conf.d/net.example | 8 | ||||
-rw-r--r-- | net-scripts/net.modules.d/macchanger | 32 |
5 files changed, 50 insertions, 18 deletions
@@ -1,6 +1,16 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2 +* baselayout-1.12.0_pre11 (23 Nov 2005) + + 23 Nov 2005; Roy Marples <uberlord@gentoo.org>: + + RC_KILL_CHILDREN now defaults to "no". This stops ssh children being + killed when a network interface is restarted. + + macchanger now ensures the interface is down before attempting to change + the mac address, #112333. + 22 Nov 2005; Roy Marples <uberlord@gentoo.org>: Stop ifplugd and netplugd from operating on bonded and vlan interfaces. diff --git a/ChangeLog.vserver b/ChangeLog.vserver index ffe4f86..c17c037 100644 --- a/ChangeLog.vserver +++ b/ChangeLog.vserver @@ -1,6 +1,17 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2 + + 23 Nov 2005; Christian Heim <phreak@gentoo.org>: + baselayout folks just did a _pre11 so I'm syncing again (to 1626 this time). + + ChangeLog | 10 +++++ + ChangeLog.vserver | 11 ++++++ + etc/conf.d/rc | 7 ++- + net-scripts/conf.d/net.example | 8 ++++ + net-scripts/net.modules.d/macchanger | 32 +++++++++--------- + 5 files changed, 50 insertions(+), 18 deletions(-) + 22 Nov 2005; Christian Heim <phreak@gentoo.org>: Uberlord did a commit right after my, so i'm syncing it again; but this time to r1622. diff --git a/etc/conf.d/rc b/etc/conf.d/rc index e04c0b0..a672722 100644 --- a/etc/conf.d/rc +++ b/etc/conf.d/rc @@ -68,9 +68,12 @@ RC_FAIL_ON_ZOMBIE="no" # Set to "yes" if stop_daemon() should attempt to kill -# any children left in the system. This does not affect sshd. +# any children left in the system. +# Be careful with this as it really does what it was on the tin. +# fex, if you're in an ssh process and you restart a service on which ssh +# depends then your terminal will be killed also. -RC_KILL_CHILDREN="yes" +RC_KILL_CHILDREN="no" # Set the amount of seconds start_daemon() waits after starting diff --git a/net-scripts/conf.d/net.example b/net-scripts/conf.d/net.example index d16aa02..ca34c8f 100644 --- a/net-scripts/conf.d/net.example +++ b/net-scripts/conf.d/net.example @@ -311,6 +311,10 @@ # Please ensure your VLAN IDs are NOT zero-padded #vlans_eth0="1 2" +# You may not want to assign an IP the the physical interface, but we still +# need it up. +#config_eth0=( "null" ) + # You can also configure the VLAN - see for vconfig man page for more details #vconfig_eth0=( "set_name_type VLAN_PLUS_VID_NO_PAD" ) #vconfig_vlan1=( "set_flag 1" "set_egress_map 2 6" ) @@ -322,6 +326,10 @@ #config_eth0.1=( "dhcp" ) - does not work #config_eth0_1=( "dhcp" ) - does work +# NOTE: Vlans are controlled by their physical interface and not per vlan +# This means you do not need to create init scripts in /etc/init.d for each +# vlan, you must need to create one for the physical interface. + #----------------------------------------------------------------------------- # Bonding # For link bonding/trunking emerge net-misc/ifenslave diff --git a/net-scripts/net.modules.d/macchanger b/net-scripts/net.modules.d/macchanger index f908fa7..773a3f2 100644 --- a/net-scripts/net.modules.d/macchanger +++ b/net-scripts/net.modules.d/macchanger @@ -29,21 +29,24 @@ macchanger_pre_start() { ebegin "Changing MAC address of ${iface}" + # The interface needs to be up for macchanger to work most of the time + interface_down "${iface}" + mac=$( echo "${!mac}" | tr '[:upper:]' '[:lower:]' ) case "${mac}" in # specific mac-addr, i wish there were a shorter way to specify this [0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]) - # We don't need macchanger to change to a specific mac address - interface_set_mac_address "${iface}" "${mac}" - eend "$?" - if [[ $? == "0" ]]; then - mac=$( interface_get_mac_address "${iface}" ) - eindent - einfo "changed to ${mac}" - eoutdent - return 0 - fi - ;; + # We don't need macchanger to change to a specific mac address + interface_set_mac_address "${iface}" "${mac}" + eend "$?" + if [[ $? == "0" ]]; then + mac=$( interface_get_mac_address "${iface}" ) + eindent + einfo "changed to ${mac}" + eoutdent + return 0 + fi + ;; # increment MAC address, default macchanger behavior increment) opts="${opts}" ;; @@ -69,17 +72,14 @@ macchanger_pre_start() { return 1 fi - # The interface needs to be up for macchanger to work most of the time - interface_down "${iface}" - mac=$( /sbin/macchanger ${opts} "${iface}" \ - | sed -n -e 's/^Faked MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' ) + | sed -n -e 's/^Faked MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' ) # Sometimes the interface needs to be up .... if [[ -z ${mac} ]]; then interface_up "${iface}" mac=$( /sbin/macchanger ${opts} "${iface}" \ - | sed -n -e 's/^Faked MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' ) + | sed -n -e 's/^Faked MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' ) fi if [[ -z ${mac} ]]; then |