aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-03 20:02:27 +0000
committerRoy Marples <roy@marples.name>2008-01-03 20:02:27 +0000
commitb349409f7bca19a6cc5f109c62288dde6eac5d8c (patch)
tree50cc25e4b50c22cc6fe89cd636df6ac16029d5c0
parent5ce37e1cef27059193ad75c35d752af85d1288e3 (diff)
br2684ctl can also exist in /usr/sbin, Gentoo bug #204186
-rw-r--r--net.Linux/br2684ctl.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/net.Linux/br2684ctl.sh b/net.Linux/br2684ctl.sh
index 3b76a069..06efc3c6 100644
--- a/net.Linux/br2684ctl.sh
+++ b/net.Linux/br2684ctl.sh
@@ -22,9 +22,17 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
+_br2684ctl() {
+ if [ -x /usr/sbin/br2684ctl ]; then
+ echo /usr/sbin/br2684ctl
+ else
+ echo /sbin/br2684ctl
+ fi
+}
+
br2684ctl_depend() {
before ppp
- program start /sbin/br2684ctl
+ program start $(_br2684ctl)
}
_config_vars="$_config_vars bridge bridge_add brctl"
@@ -52,7 +60,7 @@ br2684ctl_pre_start() {
esac
einfo "Starting RFC 2684 Bridge control on ${IFACE}"
- start-stop-daemon --start --exec /sbin/br2684ctl --background \
+ start-stop-daemon --start --exec $(_br2684ctl) --background \
--make-pidfile --pidfile "/var/run/br2684ctl-${IFACE}.pid" \
-- -c "${IFACE#nas*}" ${opts}
eend $?
@@ -63,8 +71,7 @@ br2684ctl_post_stop() {
[ -e "${pidfile}" ] || return 0
einfo "Stopping RFC 2684 Bridge control on ${IFACE}"
- start-stop-daemon --stop --quiet \
- --exec /sbin/br2684ctl --pidfile "${pidfile}"
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}"
eend $?
}