diff options
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm-postinsts.bb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb b/meta/recipes-devtools/rpm/rpm-postinsts.bb index fb05ad6d51..b551c8d4f0 100644 --- a/meta/recipes-devtools/rpm/rpm-postinsts.bb +++ b/meta/recipes-devtools/rpm/rpm-postinsts.bb | |||
@@ -27,15 +27,17 @@ do_compile() { | |||
27 | } | 27 | } |
28 | 28 | ||
29 | do_install() { | 29 | do_install() { |
30 | install -d ${D}/${sysconfdir}/rcS.d | 30 | : |
31 | # Stop $i getting expanded below... | 31 | } |
32 | i=\$i | ||
33 | cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF | ||
34 | #!/bin/sh | ||
35 | 32 | ||
33 | pkg_postinst_${PN} () { | ||
34 | if [ "x$D" != "x" ] && [ -f $D/var/lib/rpm/Packages ]; then | ||
35 | install -d $D/${sysconfdir}/rcS.d | ||
36 | cat > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << "EOF" | ||
37 | #!/bin/sh | ||
36 | . /etc/default/rcS | 38 | . /etc/default/rcS |
37 | 39 | ||
38 | [ -d /etc/rpm-postinsts ] && for i in \`ls /etc/rpm-postinsts/ \`; do | 40 | [ -d /etc/rpm-postinsts ] && for i in `ls /etc/rpm-postinsts/`; do |
39 | i=/etc/rpm-postinsts/$i | 41 | i=/etc/rpm-postinsts/$i |
40 | echo "Running postinst $i..." | 42 | echo "Running postinst $i..." |
41 | if [ -f $i ] && $i ${REDIRECT_CMD}; then | 43 | if [ -f $i ] && $i ${REDIRECT_CMD}; then |
@@ -46,5 +48,8 @@ do_install() { | |||
46 | done | 48 | done |
47 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 2>/dev/null | 49 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts 2>/dev/null |
48 | EOF | 50 | EOF |
49 | chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | 51 | chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts |
52 | fi | ||
50 | } | 53 | } |
54 | |||
55 | ALLOW_EMPTY_${PN} = "1" | ||