Corrected preferences identifier & file name.
This commit is contained in:
parent
2cd07dd57b
commit
2853d91a82
22
fluxion
22
fluxion
|
@ -15,7 +15,7 @@ readonly FLUXIONWorkspacePath="/tmp/fluxspace"
|
||||||
readonly FLUXIONIPTablesBackup="$FLUXIONPath/iptables-rules"
|
readonly FLUXIONIPTablesBackup="$FLUXIONPath/iptables-rules"
|
||||||
|
|
||||||
# Path to FLUXION's preferences file, to be loaded afterward.
|
# Path to FLUXION's preferences file, to be loaded afterward.
|
||||||
readonly FLUXIONLanguagePreferencesFile="$FLUXIONPath/preferences/LanguagePreference.conf"
|
readonly FLUXIONPreferencesFile="$FLUXIONPath/preferences/preferences.conf"
|
||||||
|
|
||||||
# Constants denoting the reference noise floor & ceiling levels.
|
# Constants denoting the reference noise floor & ceiling levels.
|
||||||
# These are used by the the wireless network scanner visualizer.
|
# These are used by the the wireless network scanner visualizer.
|
||||||
|
@ -130,11 +130,11 @@ shift # Remove "--" to prepare for attacks to read parameters.
|
||||||
# Load user-defined preferences if there's an executable script.
|
# Load user-defined preferences if there's an executable script.
|
||||||
# If no script exists, prepare one for the user to store config.
|
# If no script exists, prepare one for the user to store config.
|
||||||
# WARNING: Preferences file must assure no redeclared constants.
|
# WARNING: Preferences file must assure no redeclared constants.
|
||||||
if [ -x "$FLUXIONLanguagePreferencesFile" ]; then
|
if [ -x "$FLUXIONPreferencesFile" ]; then
|
||||||
source "$FLUXIONLanguagePreferencesFile"
|
source "$FLUXIONPreferencesFile"
|
||||||
else
|
else
|
||||||
echo '#!/bin/bash' > "$FLUXIONLanguagePreferencesFile"
|
echo '#!/bin/bash' > "$FLUXIONPreferencesFile"
|
||||||
chmod u+x "$FLUXIONLanguagePreferencesFile"
|
chmod u+x "$FLUXIONPreferencesFile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ================ < Configurable Constants > ================ #
|
# ================ < Configurable Constants > ================ #
|
||||||
|
@ -634,8 +634,8 @@ fluxion_header() {
|
||||||
fluxion_unset_language() {
|
fluxion_unset_language() {
|
||||||
FluxionLanguage=""
|
FluxionLanguage=""
|
||||||
|
|
||||||
if [ "$FLUXIONLanguagePreferencesFile" ]; then
|
if [ "$FLUXIONPreferencesFile" ]; then
|
||||||
sed -i.backup "/FluxionLanguage=.\+/ d" "$FLUXIONLanguagePreferencesFile"
|
sed -i.backup "/FluxionLanguage=.\+/ d" "$FLUXIONPreferencesFile"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -677,13 +677,13 @@ fluxion_set_language() {
|
||||||
|
|
||||||
source "$FLUXIONPath/language/$FluxionLanguage.sh"
|
source "$FLUXIONPath/language/$FluxionLanguage.sh"
|
||||||
|
|
||||||
if [ "$FLUXIONLanguagePreferencesFile" ]; then
|
if [ "$FLUXIONPreferencesFile" ]; then
|
||||||
if more $FLUXIONLanguagePreferencesFile | \
|
if more $FLUXIONPreferencesFile | \
|
||||||
grep -q "FluxionLanguage=.\+" &> /dev/null; then
|
grep -q "FluxionLanguage=.\+" &> /dev/null; then
|
||||||
sed -r "s/FluxionLanguage=.+/FluxionLanguage=$FluxionLanguage/g" \
|
sed -r "s/FluxionLanguage=.+/FluxionLanguage=$FluxionLanguage/g" \
|
||||||
-i.backup "$FLUXIONLanguagePreferencesFile"
|
-i.backup "$FLUXIONPreferencesFile"
|
||||||
else
|
else
|
||||||
echo "FluxionLanguage=$FluxionLanguage" >> "$FLUXIONLanguagePreferencesFile"
|
echo "FluxionLanguage=$FluxionLanguage" >> "$FLUXIONPreferencesFile"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue