Skip to content

Commit

Permalink
fix default_postinst and alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowrt committed Feb 9, 2024
1 parent f02319b commit a2abbc6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package/base-files/files/lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ add_group_and_user() {
}

update_alternatives() {
local root="${IPKG_INSTROOT}"
local action="$1"
local pkgname="$2"

Expand Down Expand Up @@ -314,10 +315,12 @@ default_postinst() {
local filelist
local ret=0

if [ -e "$root/usr/lib/opkg/info" ]; then
if [ -e "${root}/usr/lib/opkg/info/${pkgname}.list" ]; then
filelist="${root}/usr/lib/opkg/info/${pkgname}.list"
add_group_and_user "${pkgname}"
else
fi

if [ -e "${root}/lib/apk/packages/${pkgname}.list" ]; then
filelist="${root}/lib/apk/packages/${pkgname}.list"
update_alternatives install "${pkgname}"
fi
Expand Down

0 comments on commit a2abbc6

Please sign in to comment.