Fixed scope bug with installer definitions + posix functions.

This commit is contained in:
Matias Barcenas 2018-03-13 16:01:28 -05:00
parent 90cdea81b8
commit dc0ab6d855
6 changed files with 12 additions and 11 deletions

View File

@ -321,7 +321,8 @@ fluxion_shutdown() {
echo -e "$CWht[$CRed-$CWht] "$(
io_dynamic_output "$FLUXIONRestoringPackageManagerNotice"
)"$CClr"
unprep_package_manager
# Notice: The package manager has already been restored at this point.
# InstallerUtils assures the manager is restored after running operations.
fi
# If allocated interfaces exist, deallocate them now.

View File

@ -9,11 +9,11 @@ if [ -f "/etc/debian_version" ]; then
PackageManagerLog="/tmp/lib_package_manager.log"
function unprep_package_manager() {
unprep_package_manager() {
echo "$(cat /etc/apt/sources.list | grep -v 'deb http://http.kali.org/kali kali-rolling main non-free contrib # Installed By FLUXION')" >/etc/apt/sources.list
}
function prep_package_manager() {
prep_package_manager() {
if [ ! "$(cat /etc/apt/sources.list | egrep 'deb http://http.kali.org/kali ((kali-rolling|main|contrib|non-free) )*')" ]; then
echo "Adding missing sources to package manager, please wait."

View File

@ -9,11 +9,11 @@ if [ -f "/etc/gentoo-release" ]; then
PackageManagerLog="/tmp/lib_package_manager.log"
function unprep_package_manager() {
unprep_package_manager() {
echo "Nothing to unprepare." >$PackageManagerOutputDevice
}
function prep_package_manager() {
prep_package_manager() {
echo "Nothing to prepare." >$PackageManagerOutputDevice
}
fi

View File

@ -17,11 +17,11 @@ if [ -f "/etc/arch-release" ]; then
PackageManagerLog="/tmp/lib_package_manager.log"
function unprep_package_manager() {
unprep_package_manager() {
echo "Nothing to unprepare." >$PackageManagerOutputDevice
}
function prep_package_manager() {
prep_package_manager() {
echo "Nothing to prepare." >$PackageManagerOutputDevice
}
fi

View File

@ -9,11 +9,11 @@ if [ -f "/etc/redhat-release" ]; then
PackageManagerLog="/tmp/lib_package_manager.log"
function unprep_package_manager() {
unprep_package_manager() {
echo "Nothing to unprepare." >$PackageManagerOutputDevice
}
function prep_package_manager() {
prep_package_manager() {
echo "Nothing to prepare." >$PackageManagerOutputDevice
}
fi

View File

@ -9,11 +9,11 @@ if [ -f "/etc/SuSE-release" ]; then
PackageManagerLog="/tmp/lib_package_manager.log"
function unprep_package_manager() {
unprep_package_manager() {
echo "Nothing to unprepare." >$PackageManagerOutputDevice
}
function prep_package_manager() {
prep_package_manager() {
echo "Nothing to prepare." >$PackageManagerOutputDevice
}
fi