Add support for "preswitch" scripts

This commit is contained in:
Tray Torrance 2013-12-30 13:18:32 -08:00
parent 4f5e2401ef
commit f1315852be

View File

@ -178,6 +178,11 @@ load() {
local PROFILE="$1"
local CONF="$PROFILES/$PROFILE/config"
if [ -e "$CONF" ] ; then
[ -x "$PROFILES/preswitch" ] && \
"$PROFILES/preswitch" "$PROFILE"
[ -x "$PROFILES/$PROFILE/preswitch" ] && \
"$PROFILES/$PROFILE/preswitch" "$PROFILE"
echo " -> loading profile $PROFILE"
$LOAD_METHOD "$CONF"