-   Linux - Networking (
-   -   How to prevent auto up an interface at /etc/network/interface file ? (

Joydeep Bakshi 07-18-2011 07:34 AM

How to prevent auto up an interface at /etc/network/interface file ?
I have a ppp0 entry with post-up options like this

mapping ppp0

map none photon-plus motorola
map timeout: 12
## map init-time: 12 # for slow drivers
map verbose: true
map debug: true

#iface photon-plus inet wvdial
# dialer config in wvdial.conf
#provider tataphoton
#up ifdown eth0
#up ifdown wlan0
#up /sbin/iwconfig wlan0 txpower off
#up /root/bin/FIREWALL start
#down /sbin/iwconfig wlan0 txpower on||true

iface motorola inet wvdial
# dialer config in wvdial.conf
provider l7i
post-up ifdown eth0
post-up ifdown wlan0
post-up /sbin/iwconfig wlan0 txpower off
post-up /root/bin/FIREWALL start
down /sbin/iwconfig wlan0 txpower on

and I don't want to auto up ppp0. It is only for on-demand connection. But when I start the machine, it is also executed and the wifi as well as lan are down because of

post-up ifdown eth0
post-up ifdown wlan0
post-up /sbin/iwconfig wlan0 txpower off

If I comment those off then no such problem, hence some how ppp0 executed automatically and there is no [auto ppp0] any where.

So how can I stop this forcefully ?


business_kid 07-18-2011 09:35 AM

Is there an ONBOOT set in the scripts?

Joydeep Bakshi 07-18-2011 11:04 PM

No, there is no such configuration at /etc/network/interfaces. Even there is no "auto" keyword associated with ppp0; still the mapping of ppp0 is executed automatically !!

business_kid 07-20-2011 02:44 AM

Are you running 2 network scripts? RH & clones supply

1. /etc/rc.d/init.d/network a bash script which is no longer supported because probably the last guy that tried to work with it ended up in a home for the bewildered. It uses stiff in /etc/sysconfig/network-scripts I think (it's been a long time)

2. /etc/rc.d/init.d/NetworkManager pretending to be a bit of gnome's network manager, which I have strong opinions about. That uses different config files but don't ask me what they are.

3. It you _do_ start X then gnome's network manager (with it's settings hidden who knows where) swaggers in and does it's own thing.

chmod -x on some of those.

Joydeep Bakshi 07-20-2011 02:49 AM

Nope, it is debian box and without network-manager. I have ifplugd+guessnet combination to auto detect as well as up available eth0 and if missing then only wlan0. But also like to have ppp0 config so that when inserting 3G modem, it just make it up. Everything is fine except the auto executing of ppp0 mapping when I start my PC. And I am banging my head to prevent it.

business_kid 07-20-2011 08:42 AM

OK, then cheat.

Take the ppp0 device out of udev's rules :-D. Put the mknod command for it into your startup script for ppp0.

Joydeep Bakshi 07-20-2011 11:41 AM

No luck. udev rule is there to automatically call ppp0 when inserting modem. So even after removing the rules does not effect auto callup ppp0 after restarting the PC.

Joydeep Bakshi 07-27-2011 09:57 AM

Any clue from anyone please ?

business_kid 07-28-2011 02:43 AM

Look, either
1. Something you are starting is bringing up ppp0.
2. ppp0 is coming up because of being initialised in the original machine, or something weird like that.

This is a case where you have to go back through everything. I would start at the way you set up the vm. Now you know how sysadmins earn their money.
By the way, surely you can simply do 'ifconfig ppp0 down' and it will take down a non existent device? has it got an interrupt assigned?

All times are GMT -5. The time now is 03:53 AM.