View previous topic :: View next topic |
Author |
Message |
Aiken Apprentice
Joined: 22 Jan 2003 Posts: 239 Location: Toowoomba/Australia
|
Posted: Fri Nov 29, 2013 11:00 pm Post subject: root filesystem is network mounted -- can't stop ppp0 |
|
|
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 |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Aiken Apprentice
Joined: 22 Jan 2003 Posts: 239 Location: Toowoomba/Australia
|
Posted: Fri Nov 29, 2013 11:58 pm Post subject: |
|
|
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 |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Aiken Apprentice
Joined: 22 Jan 2003 Posts: 239 Location: Toowoomba/Australia
|
Posted: Sat Nov 30, 2013 1:22 am Post subject: |
|
|
Just tried that and nothing changed. Would have been surprised if it had worked. _________________ Beware the grue. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Aiken Apprentice
Joined: 22 Jan 2003 Posts: 239 Location: Toowoomba/Australia
|
Posted: Sat Nov 30, 2013 2:25 am Post subject: |
|
|
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 |
|
|
Aiken Apprentice
Joined: 22 Jan 2003 Posts: 239 Location: Toowoomba/Australia
|
Posted: Sat Nov 30, 2013 3:10 am Post subject: |
|
|
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 |
|
|
|