diff options
Diffstat (limited to 'meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts')
-rwxr-xr-x | meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts index 08cfa9e59f..f547a7b7bd 100755 --- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | |||
@@ -8,9 +8,29 @@ | |||
8 | # The following script will run all the scriptlets found in #SYSCONFDIR#/deb-postinsts, | 8 | # The following script will run all the scriptlets found in #SYSCONFDIR#/deb-postinsts, |
9 | # #SYSCONFDIR#/ipk-postinsts or #SYSCONFDIR#/rpm-posinsts. | 9 | # #SYSCONFDIR#/ipk-postinsts or #SYSCONFDIR#/rpm-posinsts. |
10 | 10 | ||
11 | pm=#IMAGE_PKGTYPE# | 11 | # the order of this list is important, do not change! |
12 | pm_installed=#PM_INSTALLED# | 12 | backend_list="rpm deb ipk" |
13 | pi_dir=#SYSCONFDIR#/${pm}-postinsts | 13 | |
14 | pm_installed=false | ||
15 | |||
16 | for pm in $backend_list; do | ||
17 | pi_dir="#SYSCONFDIR#/$pm-postinsts" | ||
18 | |||
19 | [ -d $pi_dir ] && break | ||
20 | |||
21 | case $pm in | ||
22 | "deb") | ||
23 | if [ -s "/var/lib/dpkg/status" ]; then | ||
24 | pm_installed=true | ||
25 | break | ||
26 | fi | ||
27 | ;; | ||
28 | |||
29 | "ipk") | ||
30 | pm_installed=true | ||
31 | ;; | ||
32 | esac | ||
33 | done | ||
14 | 34 | ||
15 | remove_rcsd_link () { | 35 | remove_rcsd_link () { |
16 | if [ -n "`which update-rc.d`" ]; then | 36 | if [ -n "`which update-rc.d`" ]; then |
@@ -56,10 +76,6 @@ if $pm_installed; then | |||
56 | "deb") | 76 | "deb") |
57 | eval dpkg --configure -a $append_log | 77 | eval dpkg --configure -a $append_log |
58 | ;; | 78 | ;; |
59 | |||
60 | "rpm") | ||
61 | exec_postinst_scriptlets | ||
62 | ;; | ||
63 | esac | 79 | esac |
64 | else | 80 | else |
65 | exec_postinst_scriptlets | 81 | exec_postinst_scriptlets |