From d2ed89b93711aa0a8a9dea4ef66ff9c9c8483b3c Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Tue, 8 Nov 2011 09:49:51 +0100 Subject: [PATCH] netup and netdown now use ~/private/interfaces. --- bashrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bashrc b/bashrc index b2af3d5..dbacd63 100644 --- a/bashrc +++ b/bashrc @@ -349,6 +349,10 @@ function netup () { return 1 fi + if [[ -f "${HOME}/private/interfaces" ]]; then + ARGS="-i ${HOME}/private/interfaces ${ARGS}" + fi + echo "Executing ${VT_GREEN_FG}[sudo ifup ${ARGS}]${VT_RESET}" sudo ifup ${ARGS} @@ -372,6 +376,11 @@ function netdown () { # Otherwise, use the standard ifdown ARGS="$@" fi + + if [[ -f "${HOME}/private/interfaces" ]]; then + ARGS="-i ${HOME}/private/interfaces ${ARGS}" + fi + echo "Executing sudo ${VT_GREEN_FG}[ifdown ${ARGS}]${VT_RESET}" sudo ifdown ${ARGS} } -- 2.20.1