| View previous topic :: View next topic |
| Author |
Message |
Ray ishido Tux's lil' helper


Joined: 17 Jan 2006 Posts: 141 Location: Piracicaba (Brazil)
|
Posted: Sun Nov 29, 2009 7:14 pm Post subject: How to prevent net.eth0/wlan0 to start? |
|
|
Hello,
surely a noob question but I don't find the answer:
Net.eth0 and net.wlan0 start at boot, but they are not programmed to start:
| Code: | raoul ray # rc-update show
lvm | boot
xdm | default
fsck | boot
hald | default
mtab | boot
root | boot
swap | boot
udev | sysinit
keymaps | boot
devfs | sysinit
dmesg | sysinit
local | default nonetwork
savecache | shutdown
NetworkManager | default
localmount | boot
consolefont | boot
firewall | default
dhcdbd | default
modules | boot
hostname | boot
mount-ro | shutdown
net.lo | boot
procfs | boot
netmount | default
sysctl | boot
urandom | boot
termencoding | boot
udev-postmount | default
hwclock | boot
bootmisc | boot
device-mapper | boot
alsasound | default
killprocs | shutdown |
so, How do I prevent them from starting? |
|
| Back to top |
|
 |
erik258 Advocate


Joined: 12 Apr 2005 Posts: 2648 Location: Twin Cities, Minnesota, USA
|
Posted: Sun Nov 29, 2009 8:58 pm Post subject: |
|
|
Hello,
your network interfaces are being automatically started by, um, either hotplug or coldplug. See /etc/conf.d/rc to modify which services are started automatically. Take a look at lines 39-46 in particular. They describe how to add entries in RC_PLUG_SERVICES so that particular network interfaces don't automatically start.
For your purposes something like this should do the job:
| Code: | | RC_PLUG_SERVICES="!net.*" |
Incidentally you may also want to look at lines 48-61. Setting | Code: | | RC_STRICT_CHECKING="lo" | will make your computer consider networking up (a requirement for rc services like sshd and nfsmount) if the local loopback device is up (which it pretty much always is). This allows you to shift between networks at will without stopping and restarting services that depend on networking, and is pretty much essential for laptops or other devices that move around a lot. _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
| Back to top |
|
 |
Ray ishido Tux's lil' helper


Joined: 17 Jan 2006 Posts: 141 Location: Piracicaba (Brazil)
|
Posted: Mon Nov 30, 2009 1:36 am Post subject: |
|
|
Hi,
thank you for your answer.
It didn't solve the pb. here is my /etc/conf.d/rc (only the lines that are not commented)
| Code: |
RC_TTY_NUMBER=11
RC_PARALLEL_STARTUP="no"
RC_INTERACTIVE="yes"
RC_HOTPLUG="yes"
RC_COLDPLUG="yes"
[b]RC_PLUG_SERVICES="!net.*"[/b]
[b]RC_NET_STRICT_CHECKING="lo"[/b]
RC_DOWN_INTERFACE="yes"
RC_VOLUME_ORDER="raid evms lvm dm"
RC_VERBOSE="no"
RC_BOOTLOG="no"
RC_BOOTCHART="no"
RC_USE_FSTAB="no"
RC_USE_CONFIG_PROFILE="yes"
RC_FORCE_AUTO="no"
RC_DEVICES="auto"
RC_DEVICE_TARBALL="no"
RC_DMESG_LEVEL="1"
RC_RETRY_KILL="yes"
RC_RETRY_TIMEOUT=1
RC_RETRY_COUNT=5
RC_FAIL_ON_ZOMBIE="no"
RC_KILL_CHILDREN="no"
RC_WAIT_ON_START="0.1"
svcdir="/var/lib/init.d"
svcmount="no"
svcfstype="tmpfs"
svcsize=2048 |
I really don't understand why the system bring up eth0 and wlan0 on boot. |
|
| Back to top |
|
 |
kmare l33t


Joined: 20 Nov 2004 Posts: 619 Location: Thessaloniki, Greece
|
Posted: Mon Nov 30, 2009 9:11 pm Post subject: |
|
|
you have
[ b ]RC_PLUG_SERVICES="!net.*"[ /b ]
[ b ]RC_NET_STRICT_CHECKING="lo"[ /b ]
in your file.. you should remove the [ b ] and [ /b ] . _________________ Never argue with an idiot. They will only pull you down to their level, then beat you with experience. |
|
| Back to top |
|
 |
Ray ishido Tux's lil' helper


Joined: 17 Jan 2006 Posts: 141 Location: Piracicaba (Brazil)
|
Posted: Tue Dec 01, 2009 1:05 pm Post subject: |
|
|
hi,
No, in the file [ b ] and [ /b ] are not present. I wanted to underline those lines in my post but didn't notice it didn't function. |
|
| Back to top |
|
 |
VinzC Advocate


Joined: 17 Apr 2004 Posts: 4345 Location: Spa (Belgium)
|
Posted: Tue Dec 01, 2009 4:10 pm Post subject: |
|
|
| Ray ishido wrote: | hi,
No, in the file [ b ] and [ /b ] are not present. I wanted to underline those lines in my post but didn't notice it didn't function. |
Highlighting doesn't work within a [code] block. Use [quote] instead. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root” |
|
| Back to top |
|
 |
erik258 Advocate


Joined: 12 Apr 2005 Posts: 2648 Location: Twin Cities, Minnesota, USA
|
Posted: Sun Dec 06, 2009 12:21 am Post subject: |
|
|
phpBB formatting aside, that seems right to me. Do you have any net.* devices in your rc-scripts? Boot and default shouldn't contain them _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
| Back to top |
|
 |
luispa Guru

Joined: 17 Mar 2006 Posts: 340 Location: España
|
Posted: Sun Dec 06, 2009 7:54 am Post subject: |
|
|
Not sure, but just in case, there are several "need net" in the other init.d scripts.
will them launch the net.* ?
Luis |
|
| Back to top |
|
 |
VinzC Advocate


Joined: 17 Apr 2004 Posts: 4345 Location: Spa (Belgium)
|
Posted: Sun Dec 06, 2009 10:31 am Post subject: |
|
|
| Quote: | RC_TTY_NUMBER=11
RC_PARALLEL_STARTUP="no"
RC_INTERACTIVE="yes"
RC_HOTPLUG="yes"
RC_COLDPLUG="yes"
RC_PLUG_SERVICES="!net.*"
RC_NET_STRICT_CHECKING="lo"
RC_DOWN_INTERFACE="yes"
RC_VOLUME_ORDER="raid evms lvm dm"
RC_VERBOSE="no"
RC_BOOTLOG="no"
RC_BOOTCHART="no"
RC_USE_FSTAB="no"
RC_USE_CONFIG_PROFILE="yes"
RC_FORCE_AUTO="no"
RC_DEVICES="auto"
RC_DEVICE_TARBALL="no"
RC_DMESG_LEVEL="1"
RC_RETRY_KILL="yes"
RC_RETRY_TIMEOUT=1
RC_RETRY_COUNT=5
RC_FAIL_ON_ZOMBIE="no"
RC_KILL_CHILDREN="no"
RC_WAIT_ON_START="0.1"
svcdir="/var/lib/init.d"
svcmount="no"
svcfstype="tmpfs"
svcsize=2048 |
| Ray ishido wrote: | | I really don't understand why the system bring up eth0 and wlan0 on boot. |
Udev triggers network scripts as soon as it's activated -- see boot messages before any other services. As a quick check, unset RC_PLUG_SERVICES and see what happens.
| Code: | raoul ray # rc-update show
...
NetworkManager | default
...
netmount | default
... |
BTW Isn't NetworkManager supposed to start these network devices? _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root” |
|
| Back to top |
|
 |
WastingBody Tux's lil' helper


Joined: 09 May 2008 Posts: 105
|
Posted: Sun Dec 06, 2009 7:07 pm Post subject: |
|
|
NetworkManager will start those devices on their own. Put this in your "/etc/conf.d/local.start"; it will disable NetworkManager from starting the wireless interface until you want to start it with the applet.
| Code: | dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Set \
string:org.freedesktop.NetworkManager string:WirelessEnabled \
variant:boolean:false |
|
|
| Back to top |
|
 |
VinzC Advocate


Joined: 17 Apr 2004 Posts: 4345 Location: Spa (Belgium)
|
Posted: Sun Dec 06, 2009 9:45 pm Post subject: |
|
|
| Code: | dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Set \
string:org.freedesktop.NetworkManager string:WirelessEnabled \
variant:boolean:false |
| WastingBody wrote: | | NetworkManager will start those devices on their own. Put this in your "/etc/conf.d/local.start"; it will disable NetworkManager from starting the wireless interface until you want to start it with the applet. |
Wow! Looks like some people are making GNU desktop et al. as complex and non-obvious to manage as Window$...  _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root” |
|
| Back to top |
|
 |
WastingBody Tux's lil' helper


Joined: 09 May 2008 Posts: 105
|
Posted: Sun Dec 06, 2009 11:14 pm Post subject: |
|
|
| It would be nice to have one of those nifty little check boxes that could disable networking by default. |
|
| Back to top |
|
 |
joeklow n00b


Joined: 23 Jan 2011 Posts: 29
|
Posted: Thu Mar 24, 2011 12:43 am Post subject: |
|
|
| WastingBody wrote: | NetworkManager will start those devices on their own. Put this in your "/etc/conf.d/local.start"; it will disable NetworkManager from starting the wireless interface until you want to start it with the applet.
| Code: | dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Set \
string:org.freedesktop.NetworkManager string:WirelessEnabled \
variant:boolean:false |
|
Any way to include this functionality into NetworkManager init.d script (without modifying it)?
I have some weird problems with NM/DBUS/ACPI/ath9k device working together, e.g. unpredicable shutdowns (cant power on until AC power cut for seconds)
| VinzC wrote: |
Wow! Looks like some people are making GNU desktop et al. as complex and non-obvious to manage as Window$...  |
Unobvious hacks are for features, that are normally unexpected even at developer station and network's geek laptop, right?
However, that Ubuntish NM really drives me crazy. |
|
| Back to top |
|
 |
divago Tux's lil' helper

Joined: 04 Jun 2010 Posts: 84
|
Posted: Thu Mar 24, 2011 9:42 am Post subject: |
|
|
hi, i got same problem here
(net.eth0 and net.wlan0 still start even if i rc-update deleted it, and NetworkManager/wicd does'nt start)
btw someone adviced me to just delete /etc/init.d/net.eth0 and /etc/init.d/net.wlan0 script; i dunno if this is working, 'cause at the moment i cannot reboot the pc so i'll try it as soon as possible
hope this could help you  |
|
| Back to top |
|
 |
skellr l33t


Joined: 18 Jun 2005 Posts: 698 Location: The Village
|
Posted: Thu Mar 24, 2011 12:24 pm Post subject: |
|
|
| Also make sure that net.wlan0 or net.eth0 isn't a symlink to net.lo in /etc/init.d/ |
|
| Back to top |
|
 |
divago Tux's lil' helper

Joined: 04 Jun 2010 Posts: 84
|
Posted: Thu Mar 24, 2011 2:52 pm Post subject: |
|
|
| skellr wrote: | | Also make sure that net.wlan0 or net.eth0 isn't a symlink to net.lo in /etc/init.d/ |
ok in my case net.eth0 and net.wlan0 was link to net.lo
so i unlinked it with
| Code: | unlink /etc/init.d/net.eth0
unlink /etc/init.d/net.wlan0 |
and now it works fine net start with NM (or wicd) and also start sshd... |
|
| Back to top |
|
 |
trossachs Veteran


Joined: 22 Jan 2004 Posts: 1204 Location: London
|
Posted: Fri Nov 04, 2011 8:49 am Post subject: |
|
|
I have a similar problem in that whenever I start eth1, it defaults to dhcp and requests an address even though I have specifically specified a static one. Why does it not read from /etc/conf.d/net?
| Code: | iface_eth1="192.168.1.6 netmask 255.255.255.0 brd 192.168.1.0"
routes_eth1="default via 192.168.1.1" |
|
|
| Back to top |
|
 |
bornmw n00b

Joined: 13 Apr 2009 Posts: 34
|
|
| Back to top |
|
 |
bornmw n00b

Joined: 13 Apr 2009 Posts: 34
|
Posted: Fri Dec 02, 2011 6:57 pm Post subject: |
|
|
just for the record - /etc/conf.d/rc is baselayout 1 and is now deprecated
use /etc/rc.conf which is baselayout 2 |
|
| Back to top |
|
 |
|