From: Francois Fleuret Date: Tue, 8 Nov 2011 08:49:51 +0000 (+0100) Subject: netup and netdown now use ~/private/interfaces. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2ed89b93711aa0a8a9dea4ef66ff9c9c8483b3c;p=scripts.git netup and netdown now use ~/private/interfaces. --- 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} }