#------------------------------------------------------------------------------
start_vpn() {
+ debug "Activating trap ..."
trap restore_normal_conf INT TERM EXIT ABRT
info "Enabling special ${CYAN}/etc/resolv.conf${NORMAL} by ${CYAN}${RESOLV_CONF_DPX}${NORMAL} ..."
debug "Executing: ${cmd}"
eval ${cmd}
+ debug "Deactivating trap ..."
+ trap - INT TERM EXIT ABRT
+
+ restore_normal_conf
+
}
#------------------------------------------------------------------------------
CYAN=""
NORMAL=""
-VERSION="0.3.0"
+VERSION="0.3.1"
STD_SHORT_OPTIONS="sdvhV"
STD_LONG_OPTIONS="simulate,debug,verbose,nocolor,help,version"
}
+#------------------------------------------------------------------------------
+CP() {
+
+ if [[ "${SIMULATE}" == "y" ]] ; then
+ debug "Simulated copying of: $*"
+ return
+ fi
+ if [[ "${VERBOSE}" != "y" ]] ; then
+ cp "$@"
+ else
+ cp --verbose "$@"
+ fi
+
+}
+
#------------------------------------------------------------------------------
set_locale() {