Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
root filesystem is network mounted -- can't stop ppp0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Aiken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2003
Posts: 112
Location: Toowoomba/Australia

PostPosted: Fri Nov 29, 2013 11:00 pm    Post subject: root filesystem is network mounted -- can't stop ppp0 Reply with quote

Code:

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.
_________________
Beware the grue.
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4560
Location: Saint Amant, Acadiana

PostPosted: Fri Nov 29, 2013 11:05 pm    Post subject: Reply with quote

See /etc/rc.conf - you can remove dependencies there.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Aiken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2003
Posts: 112
Location: Toowoomba/Australia

PostPosted: Fri Nov 29, 2013 11:58 pm    Post subject: Reply with quote

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.

Code:

      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.
_________________
Beware the grue.
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4560
Location: Saint Amant, Acadiana

PostPosted: Sat Nov 30, 2013 12:17 am    Post subject: Reply with quote

Code:
# 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?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Aiken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2003
Posts: 112
Location: Toowoomba/Australia

PostPosted: Sat Nov 30, 2013 1:22 am    Post subject: Reply with quote

Just tried that and nothing changed. Would have been surprised if it had worked.
_________________
Beware the grue.
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4560
Location: Saint Amant, Acadiana

PostPosted: Sat Nov 30, 2013 1:45 am    Post subject: Reply with quote

I'm surprised it didn't work, what exactly did you enable? rc_net_ppp0_provide="!net" ?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Aiken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2003
Posts: 112
Location: Toowoomba/Australia

PostPosted: Sat Nov 30, 2013 2:25 am    Post subject: Reply with quote

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.
_________________
Beware the grue.
Back to top
View user's profile Send private message
Aiken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2003
Posts: 112
Location: Toowoomba/Australia

PostPosted: Sat Nov 30, 2013 3:10 am    Post subject: Reply with quote

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.

Code:

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

Code:

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 /.
_________________
Beware the grue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum