projects
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
576c6cd
)
netup and netdown now use ~/private/interfaces.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 8 Nov 2011 08:49:51 +0000
(09:49 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 8 Nov 2011 08:49:51 +0000
(09:49 +0100)
bashrc
patch
|
blob
|
history
diff --git
a/bashrc
b/bashrc
index
b2af3d5
..
dbacd63
100644
(file)
--- a/
bashrc
+++ b/
bashrc
@@
-349,6
+349,10
@@
function netup () {
return 1
fi
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}
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
# 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}
}
echo "Executing sudo ${VT_GREEN_FG}[ifdown ${ARGS}]${VT_RESET}"
sudo ifdown ${ARGS}
}