# NO! NO! NO! I DON'T want it started

## curmudgeon

After a number of recent updates (notably including openrc and dhcpcd, something is attempting to start dhcpcd at boot (which I most emphatically do NOT want).

The rc-status -u command shows dhcpcd as not assigned to any runlevel

I have had ("forever") in my /etc/rc.conf (to prevent network devices from being started automatically):

```

rc_hotplug='!net.eth0 !net.wlan0'

```

It seems even worse than I imagined. Something is starting every possbile interface (I don't want to see ANY of these, except for lo):

```

# /bin/ifconfig

dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500

        inet6 fe80::9c14:b3ff:fefb:e5a3  prefixlen 64  scopeid 0x20<link>

        ether 9e:14:b3:fb:e5:a3  txqueuelen 0  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 7  bytes 1678 (1.6 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether 00:16:36:bd:93:34  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 18  memory 0xda000000-da020000  

ip6tnl0: flags=193<UP,RUNNING,NOARP>  mtu 1452

        inet6 fe80::9c14:b3ff:fefb:e5a3  prefixlen 64  scopeid 0x20<link>

        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 0  (UNSPEC)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 7  dropped 7 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 60  bytes 4468 (4.3 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 60  bytes 4468 (4.3 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=193<UP,RUNNING,NOARP>  mtu 1480

        inet6 ::127.0.0.1  prefixlen 96  scopeid 0x90<compat,host>

        sit  txqueuelen 0  (IPv6-in-IPv4)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 4  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether 00:18:de:a3:99:93  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

```

What do I do so that dhcpcd does NOT get run at boot, and none of the network interfaces (other than lo) gets started?

If (as I now suspect after some thought) that some other service is triggering this, is there some way of configuring the startup so that 1) only specific interfaces are tried, or (even better) 2) the other service fails (quickly) if a specific device is not up, rather than attempting to bring up all of them, or 3) there is someway to say "you are not to start this service no matter what" (I like that best of all)?

----------

## chuber

hi,

i would try to put something like config_eth0=( "null" )  in /etc/conf.d/net.

maybe also erase the link /etc/init.d/net.eth0  from net.lo

----------

## _______0

```
/etc/rc.conf
```

^^^ wrong place.

right place:

```
/etc/conf.d/network
```

also why do you need sit0, dummy0 and ip6tnl0?

oO

and I don't see how dhcp is run, all your interfaces have empty addresses.

----------

## Crazy_Jerry

 *

----------

## Crazy_Jerry

I have same problem , and I have no answer . But I guess the problem is update bug in some program , is this possible?

----------

## _______0

```
bzless /usr/share/doc/openrc-0.11.8/net.example.bz2
```

correction, place is:

```

/etc/conf.d/net
```

Gentoo handbook networking chapter:

 *Quote:*   

> D. Gentoo Network Configuration

 

----------

## Ant P.

```
echo "allowinterfaces none" >> /etc/dhcpcd.conf
```

----------

## Hu

Are you trying to avoid starting the interface at boot, but use DHCP once the interface is started later, possibly by you?  Or are you trying to avoid ever running DHCP on the interface, regardless of when or why the interface is brought up?  All prior answers appear to assume the latter, but your remark to prevent network devices from being started automatically seems to mean you just want to control when the interfaces are brought up, but you might still want DHCP on the interface once you bring it up.

What is your current setting for the rc strict network check?  Perhaps your configuration is now attempting to start all interfaces in order to satisfy a need net statement.

----------

## robvr

 *curmudgeon wrote:*   

> After a number of recent updates (notably including openrc and dhcpcd, something is attempting to start dhcpcd at boot (which I most emphatically do NOT want).

 

I've been battling a very similar situation today. For what it's worth, this is what I found:

A whole bunch of things started by openrc require the 'net' service (this is not illogical).

At present, the /etc/init.d/net.lo service does not provide 'net' (I don't understand this).

As a result of this, whenever anything that needs 'net' is started, openrc will go looking for something that provides it, typically net.eth0, and starts it. One way of preventing this is to modify the /etc/init.d/net.lo script to provide 'net'. This script is the same for all network interfaces, but provides 'net' only if the interface name is different from lo.

```

        case "${IFACE}" in

                lo|lo0) ;;

                *)

                        after net.lo net.lo0 dbus

                        provide net

                        ;;

        esac

```

Replace this with 

```

        provide net

        case "${IFACE}" in

                lo|lo0) ;;

                *)

                        after net.lo net.lo0 dbus

                        ;;

        esac

```

and things will improve.

However, I don't think that solves your entire problem; as soon as you bring up any interface except lo, you'll probably still get all of them.

This is caused by the /etc/init.d/dhcpcd script. The command line passed to the actual /sbin/dhcpcd is almost empty, in particular, it does not specify an interface. When invoked without an interface, it default to starting all interfaces. You may want to work some magic on the script to suit your purposes.

----------

