fixed pre post capabilities

This commit is contained in:
2021-11-19 00:18:16 +01:00
parent b71a0c2ee8
commit c71b22f326
2 changed files with 13 additions and 13 deletions

View File

@@ -29,15 +29,15 @@ pkginst()
exit 11 exit 11
fi fi
if [[ ! $INSTALL_MODE == dev ]]; then if [[ ! $INSTALL_MODE == dev ]]; then
# exec_preinst $@ exec_preinst $@
$PKG_MAN $COM_INSTALL $@ $PKG_MAN $COM_INSTALL $@
# exec_postinst exec_postinst
else else
local pkg= local pkg=
for pkg in $@; do for pkg in $@; do
# exec_preinst $pkg exec_preinst $pkg
$PKG_MAN $COM_INSTALL $pkg $PKG_MAN $COM_INSTALL $pkg
# exec_postinst exec_postinst
done done
unset pkg unset pkg
fi fi
@@ -50,9 +50,9 @@ export -f pkginst
pkgupgd() pkgupgd()
{ {
prnt I "Applying system upgrade..." prnt I "Applying system upgrade..."
# exec_preupgd exec_preupgd
$PKG_MAN $COM_UPGRADE $PKG_MAN $COM_UPGRADE
# exec_postupgd exec_postupgd
} }
export -f pkgupgd export -f pkgupgd
@@ -67,15 +67,15 @@ pkgrm()
exit 11 exit 11
fi fi
if [[ ! $INSTALL_MODE == dev ]]; then if [[ ! $INSTALL_MODE == dev ]]; then
# exec_prerm $@ exec_prerm $@
$PKG_MAN $COM_REMOVE $@ $PKG_MAN $COM_REMOVE $@
# exec_postrm exec_postrm
else else
local pkg= local pkg=
for pkg in $@; do for pkg in $@; do
# exec_prerm $pkg exec_prerm $pkg
$PKG_MAN $COM_REMOVE $pkg $PKG_MAN $COM_REMOVE $pkg
# exec_postrm exec_postrm
done done
uset pkg uset pkg
fi fi
@@ -88,9 +88,9 @@ export -f pkgrm
pkgautorm() pkgautorm()
{ {
prnt I "Uninstalling unneeded packages..." prnt I "Uninstalling unneeded packages..."
# exec_preautorm exec_preautorm
$PKG_MAN $COM_AUTOREM $PKG_MAN $COM_AUTOREM
# exec_postautorm exec_postautorm
} }
export -f pkgautorm export -f pkgautorm

View File

@@ -21,7 +21,7 @@ export -f stdtime
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Check if a function exists, return 0 if so # Check if a function exists, return 0 if so
function_exists() { function_exists() {
declare -f -F $1 > /dev/null declare -f -F $1 2>&1 /dev/null
return $? return $?
} }
export -f function_exists export -f function_exists