summaryrefslogtreecommitdiff
path: root/meta/packages
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages')
-rwxr-xr-xmeta/packages/meta/run-postinsts/run-postinsts12
-rw-r--r--meta/packages/meta/run-postinsts/run-postinsts.awk7
-rw-r--r--meta/packages/meta/run-postinsts_1.0.bb2
3 files changed, 18 insertions, 3 deletions
diff --git a/meta/packages/meta/run-postinsts/run-postinsts b/meta/packages/meta/run-postinsts/run-postinsts
index cb24a623f..46b3327f4 100755
--- a/meta/packages/meta/run-postinsts/run-postinsts
+++ b/meta/packages/meta/run-postinsts/run-postinsts
@@ -5,7 +5,17 @@
# Author: Richard Purdie <rpurdie@openedhand.com>
#
-PKGSYSTEM=/usr/lib/opkg
+PKGSYSTEM=/usr/dpkg
+
+if [ ! -e $PKGSYSTEM/status ]; then
+ if [ -e /usr/lib/opkg/status ]; then
+ PKGSYSTEM=/usr/lib/opkg
+ else
+ echo "No package system found"
+ exit 1
+ fi
+fi
+
STAMP=$PKGSYSTEM/postinsts-done
STATFILE=$PKGSYSTEM/status
STATFILE2=$PKGSYSTEM/status2
diff --git a/meta/packages/meta/run-postinsts/run-postinsts.awk b/meta/packages/meta/run-postinsts/run-postinsts.awk
index 46ee8df9a..bdea8c95a 100644
--- a/meta/packages/meta/run-postinsts/run-postinsts.awk
+++ b/meta/packages/meta/run-postinsts/run-postinsts.awk
@@ -7,6 +7,11 @@
#
BEGIN {
+ rc=system("test -d /usr/dpkg/info/")
+ if (rc==0)
+ pkgdir="/usr/dpkg/info"
+ else
+ pkgdir="/usr/lib/opkg/info"
package=""
}
/Package:.*/ {
@@ -14,7 +19,7 @@ BEGIN {
}
/Status:.*unpacked.*/ {
print "Configuring: " package > "/dev/stderr"
- ret = system("/usr/lib/opkg/info/" package ".postinst 1>&2")
+ ret = system(pkgdir "/" package ".postinst 1>&2")
if (ret == 0)
$0 = gensub("unpacked", "installed", 1)
else
diff --git a/meta/packages/meta/run-postinsts_1.0.bb b/meta/packages/meta/run-postinsts_1.0.bb
index bf132f51f..ec3412738 100644
--- a/meta/packages/meta/run-postinsts_1.0.bb
+++ b/meta/packages/meta/run-postinsts_1.0.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Run postinstall scripts on device using awk"
SECTION = "devel"
-PR = "r1"
+PR = "r4"
SRC_URI = "file://run-postinsts file://run-postinsts.awk"