projects
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d2ed89b
)
Update.
author
Francois Fleuret
<francois@fleuret.org>
Mon, 21 Nov 2011 07:41:26 +0000
(08:41 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Mon, 21 Nov 2011 07:41:26 +0000
(08:41 +0100)
bashrc
patch
|
blob
|
history
diff --git
a/bashrc
b/bashrc
index
dbacd63
..
cca943d
100644
(file)
--- a/
bashrc
+++ b/
bashrc
@@
-335,6
+335,16
@@
function dt () {
[[ ${NETUP_HISTORY} ]] || NETUP_HISTORY="${HOME}/.netup_history"
function netup () {
[[ ${NETUP_HISTORY} ]] || NETUP_HISTORY="${HOME}/.netup_history"
function netup () {
+ if [[ $(ps auxwww | grep dhclient | grep -v grep) ]]; then
+ echo "There is already a dhcp client running." >&2
+ return 1
+ fi
+
+ if [[ $(ps auxwww | grep wpa_supplicant | grep -v grep) ]]; then
+ echo "There is already a wpa_supplicant running." >&2
+ return 1
+ fi
+
if [[ ! "$@" ]] && [[ -s ${NETUP_HISTORY} ]]; then
# If we have no argument and there is a .netup_history, use it
ARGS=$(cat ${NETUP_HISTORY})
if [[ ! "$@" ]] && [[ -s ${NETUP_HISTORY} ]]; then
# If we have no argument and there is a .netup_history, use it
ARGS=$(cat ${NETUP_HISTORY})
@@
-344,13
+354,8
@@
function netup () {
echo ${ARGS} > ${NETUP_HISTORY}
fi
echo ${ARGS} > ${NETUP_HISTORY}
fi
- if [[ $(ps auxwww | grep dhclient | grep -v grep) ]]; then
- echo "There is already a dhcp client running." >&2
- return 1
- fi
-
- if [[ -f "${HOME}/private/interfaces" ]]; then
- ARGS="-i ${HOME}/private/interfaces ${ARGS}"
+ if [[ -n "${PRIVATE_INTERFACE_DEFINITION}" ]]; then
+ ARGS="-i ${PRIVATE_INTERFACE_DEFINITION} ${ARGS}"
fi
echo "Executing ${VT_GREEN_FG}[sudo ifup ${ARGS}]${VT_RESET}"
fi
echo "Executing ${VT_GREEN_FG}[sudo ifup ${ARGS}]${VT_RESET}"
@@
-377,8
+382,8
@@
function netdown () {
ARGS="$@"
fi
ARGS="$@"
fi
- if [[ -
f "${HOME}/private/interfaces
" ]]; then
- ARGS="-i ${
HOME}/private/interfaces
${ARGS}"
+ if [[ -
n "${PRIVATE_INTERFACE_DEFINITION}
" ]]; then
+ ARGS="-i ${
PRIVATE_INTERFACE_DEFINITION}
${ARGS}"
fi
echo "Executing sudo ${VT_GREEN_FG}[ifdown ${ARGS}]${VT_RESET}"
fi
echo "Executing sudo ${VT_GREEN_FG}[ifdown ${ARGS}]${VT_RESET}"
@@
-841,7
+846,7
@@
alias finddup='finddup -p'
#
# git clone http://fleuret.org/git/selector/
#
# git clone http://fleuret.org/git/selector/
-. bash-selector.sh
+source bash-selector.sh --hist --cd
######################################################################
# And we avoid to put in the history the use of the selector, which we
######################################################################
# And we avoid to put in the history the use of the selector, which we