diff --git a/lib/pkgman.sh b/lib/pkgman.sh index 9325567..a2d59c9 100644 --- a/lib/pkgman.sh +++ b/lib/pkgman.sh @@ -29,15 +29,15 @@ pkginst() exit 11 fi if [[ ! $INSTALL_MODE == dev ]]; then -# exec_preinst $@ + exec_preinst $@ $PKG_MAN $COM_INSTALL $@ -# exec_postinst + exec_postinst else local pkg= for pkg in $@; do -# exec_preinst $pkg + exec_preinst $pkg $PKG_MAN $COM_INSTALL $pkg -# exec_postinst + exec_postinst done unset pkg fi @@ -50,9 +50,9 @@ export -f pkginst pkgupgd() { prnt I "Applying system upgrade..." -# exec_preupgd + exec_preupgd $PKG_MAN $COM_UPGRADE -# exec_postupgd + exec_postupgd } export -f pkgupgd @@ -67,15 +67,15 @@ pkgrm() exit 11 fi if [[ ! $INSTALL_MODE == dev ]]; then -# exec_prerm $@ + exec_prerm $@ $PKG_MAN $COM_REMOVE $@ -# exec_postrm + exec_postrm else local pkg= for pkg in $@; do -# exec_prerm $pkg + exec_prerm $pkg $PKG_MAN $COM_REMOVE $pkg -# exec_postrm + exec_postrm done uset pkg fi @@ -88,9 +88,9 @@ export -f pkgrm pkgautorm() { prnt I "Uninstalling unneeded packages..." -# exec_preautorm + exec_preautorm $PKG_MAN $COM_AUTOREM -# exec_postautorm + exec_postautorm } export -f pkgautorm diff --git a/lib/utils.sh b/lib/utils.sh index de1f4a4..6646e26 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -21,7 +21,7 @@ export -f stdtime # ------------------------------------------------------------------------------ # Check if a function exists, return 0 if so function_exists() { - declare -f -F $1 > /dev/null + declare -f -F $1 2>&1 /dev/null return $? } export -f function_exists