# root filesystem is network mounted -- can't stop ppp0

## Aiken

```

betty ~ # /etc/init.d/net.ppp0 stop

 * Bringing down interface ppp0

 *   root filesystem is network mounted -- can't stop ppp0

 * ERROR: net.ppp0 failed to stop

```

The computer I am using as my router is running diskless with / mounted nfs via eth1. The check in net.lo does not seem to care what interface / is mounted on, only that / is network mounted. So even though ppp0 has nothing to do with / the init script still refuses to stop it.

Instead of a symlink from net.lo to net.ppp0 I copy net.lo to net.ppp0 then remove that check so I can start/stop ppp0 when I want. Repeat whenever the network init scripts are updated. Wondering how others deal with this.

----------

## Jaglover

See /etc/rc.conf - you can remove dependencies there.

----------

## Aiken

The closest I have found is rc_depend_strict which does nothing with regards this and extra_net_fs_list which is not what I want. The check in net.lo is checking if / is mounted via the network and acting on that.

```

      if is_net_fs /; then

         eerror "root filesystem is network mounted -- can't stop ${IFACE}"

         return 1

      fi

```

That is the code I removed from stop() in net.ppp0. The function is_net_fs determines / is nfs with no apparent check to determine which interface it is mounted via.

----------

## Jaglover

```
# You can also remove dependencies.

# This is mainly used for saying which servies do NOT provide net.

#rc_net_tap0_provide="!net"

```

Did you try this?

----------

## Aiken

Just tried that and nothing changed. Would have been surprised if it had worked.

----------

## Jaglover

I'm surprised it didn't work, what exactly did you enable? rc_net_ppp0_provide="!net" ?

----------

## Aiken

I set rc_net_ppp0_provide="!net"

Used a modified net.ppp0 so I could stop ppp0.

Used a std net.ppp0 to start it.

Tried stopping ppp0 with the std net.ppp0 and it refused to stop because / is network mounted.

At the moment I do not think it is a net dependency. I think it is simple code that blocks the stopping of any network interface when / on a net fs.

----------

## Aiken

Got something that works. Tried the following in /etc/conf.d/net. Allowed me to shutdown ppp0 at will using an unmodified net.ppp0 while still retaining the normal check for / on net fs.

```

predown() {

    if [ "${IFACE}" == "ppp0" ]

    then

        return 0

    fi

    if is_net_fs /; then

        eerror "root filesystem is network mounted -- can't stop ${IFACE}"

        return 1

    fi

    return 0

}

```

Instead of singling out ppp0 for special treatment, as / is always mounted via eth1 changed the above to

```

predown() {

    if [ "${IFACE}" == "eth1" ]

    then

        return 1

    fi

    return 0

}

```

allowing me to play with eth0 & ppp0 much as I want while forcing eth1 to stay up for /.

----------

