Hi James,
actually - I tried what you said before. However - this won't work for me.
I have bound some servers explicitely for Lan usage to the fixed IP of device
eth0. As I have users using my services from remote sites using IPSec or
ssh-tunnels, or users through the WiFi lan using my servers explicetly
through the Private address range - these need to be activated at boot-up
even if no cable is connected - which means - the Connected switch is shut
down.
The Problem is - that if the ifplugd removes the IP-Address of a device, the
servers that are supposed to listen on that IP/Port combination will refuse
to do so - as the Interface is not active, thus named, postfix/sendmail,
mysql, apache, cyrus-imap etc. will all not listen on the Internal LAN - and
this is not an option for me.
I can not use the 127.0.0.1 - as that one, everyone has it on his local
machine - so no routing.
I have written a little patch to /etc/init.d/network that actually takes into
account the /etc/ifplugd/ifplugd.conf INTERFACES variable - to see if that
interface is to be started using ifplugd or not. I know that the
MII_NOT_SUPPORTED from the /etc/sysconfig/network-scripts/ifcfg-ethX can
also disable ifplugd - however I do think that it is not coherent to have a
ifplugd.conf file where the INTERFACES var is not taken into account by the
startup scripts. Anyway -
Attached is the patch against /etc/init.d/networks as found in vanilla
initscripts-7.06-12.2mdk package.
Cheers
Joerg
On Wednesday 06 August 2003 02:28, James Sparenberg wrote:
> On Tue, 2003-08-05 at 04:05, Joerg Mertin wrote:
> > Hi Folks,
> >
> > I have some kind of a nasty problem.
> >
> > I have a small server with 3 Lan ports - however - when I don't need the
> > Local LAN - I do also power-down the Switch. This is however a problem -
> > as ifplugd performs a Interface shutdown - and for some apps to work
> > correctly - the Interface needs an IP address.
> >
> > So - I defined what Interfaces the ifplugd should take care of in
> > /etc/ifplugd/ifplugd.conf (eth2 - DHCP Cable Network), and want it to
> > ignore other ones.
> >
> > No go... As soon as I unplug the eth0 cable - the device IP address is
> > removed. I have circumvented this issue by deactivating the ifplugd stuff
> > to be used completely (removing the if-statement in rc.d/init.d/networks
> > using ifplugd) - at least - everything is working as it should - but this
> > should not happen IMHO.
> >
> > Anyone knows a better way ???
> >
> > Cheers
>
> Jeorg I run into this with a laptop and what I did was add this line to
> my /etc/hosts file
>
> 127.0.0.1 jamlap.linuxpda.biz jamlap
>
>
> now if I either startup without a net connection or remove the
> connection, I still keep things like proftpd for example working. (since
> I sometimes run uml I need it working for testing.) It also helps with
> reading mail in Evolution because although it will start without an IP
> number it takes forever.
>
> James
>
> > Joerg
--
Excessive login or logout messages are a sure sign of senility.
------------------------------------------------------------------------
| Joerg Mertin : [EMAIL PROTECTED] (Home)|
| in Neuch�tel/Schweiz : [EMAIL PROTECTED] (Alt1)|
| Stardust's LiNUX System : [EMAIL PROTECTED] (Alt2)|
| Web: http://www.solsys.org: Voice & Fax: +41(0)32 / 725 52 54 |
------------------------------------------------------------------------
PGP Fingerprint: AF0F FB75 997B 025F 4538 5AD6 9888 5D97 170B 8B7A
--- network_old 2003-06-20 05:42:54.000000000 +0200
+++ network 2003-08-06 10:08:14.000000000 +0200
@@ -24,6 +24,10 @@
. /etc/sysconfig/pcmcia
fi
+# Load th e ifplugd config if it exists
+if [ -f /etc/ifplugd/ifplugd.conf ]; then
+ . /etc/ifplugd/ifplugd.conf
+fi
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
@@ -137,7 +141,7 @@
;;
esac
}
- if [ "${DEVICE:0:3}" != "eth" -o ${DEVICE/:/} != ${DEVICE} -o ! -x /sbin/ifplugd ] || grep -q '^MII_NOT_SUPPORTED' ifcfg-$i; then
+ if [ "${DEVICE:0:3}" != "eth" -o ${DEVICE/:/} != ${DEVICE} -o ! -x /sbin/ifplugd ] || grep -q '^MII_NOT_SUPPORTED' ifcfg-$i || [ `echo ${INTERFACES} | grep -c ${DEVICE}` -eq 0 ]; then
action "Bringing up interface %s: " $i ./ifup $DEVICE boot
else
IFPLUGD_ARGS="${IFPLUGD_ARGS=-w -b}"
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com