recipes: pre/post actions
A number of the recipes did not properly label their pre and post actions, causing the actions to occur in all split packages. This was corrected by defaulting to _${PN} in most cases. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
This commit is contained in:
parent
6f6bffe5df
commit
92a9d59fcc
|
@ -19,13 +19,13 @@ do_install() {
|
|||
install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modutils/hostap_cs.conf
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
if [ -n "$D" ]; then
|
||||
exit 1
|
||||
fi
|
||||
update-modules || true
|
||||
}
|
||||
|
||||
pkg_postrm () {
|
||||
pkg_postrm_${PN} () {
|
||||
update-modules || true
|
||||
}
|
||||
|
|
|
@ -28,13 +28,13 @@ do_install() {
|
|||
install -m 0755 src/lrz src/lsz ${D}${bindir}/
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
pkg_postinst_${PN}() {
|
||||
for util in rz rx rb sz sx sb; do
|
||||
update-alternatives --install ${bindir}/$util $util lrz 100
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
pkg_postrm_${PN}() {
|
||||
for util in rz rx rb sz sx sb; do
|
||||
update-alternatives --remove $util ${bindir}/lrz
|
||||
done
|
||||
|
|
|
@ -15,13 +15,13 @@ do_install() {
|
|||
install -m 0644 ${WORKDIR}/orinoco_cs.conf ${D}${sysconfdir}/modutils/
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
if [ -n "$D" ]; then
|
||||
exit 1
|
||||
fi
|
||||
update-modules || true
|
||||
}
|
||||
|
||||
pkg_postrm () {
|
||||
pkg_postrm_${PN} () {
|
||||
update-modules || true
|
||||
}
|
||||
|
|
|
@ -25,14 +25,14 @@ DEBIANNAME_${PN} = "libnss-mdns"
|
|||
EXTRA_OECONF = "--libdir=/lib --disable-lynx --enable-avahi"
|
||||
|
||||
# TODO: pattern based configuration update
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
|
||||
cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
|
||||
mv /tmp/nsswitch.conf /etc/nsswitch.conf
|
||||
}
|
||||
}
|
||||
|
||||
pkg_prerm () {
|
||||
pkg_prerm_${PN} () {
|
||||
cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns4$" > /dev/null && {
|
||||
cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files dns\) mdns4*/\1/' > /tmp/nsswitch.conf
|
||||
mv /tmp/nsswitch.conf /etc/nsswitch.conf
|
||||
|
|
|
@ -20,7 +20,7 @@ do_install() {
|
|||
|
||||
PACKAGE_ARCH = "all"
|
||||
|
||||
pkg_postinst() {
|
||||
pkg_postinst_${PN} () {
|
||||
if test "x$D" != "x"; then
|
||||
exit 1
|
||||
else
|
||||
|
@ -28,7 +28,7 @@ else
|
|||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
pkg_postrm_${PN} () {
|
||||
if test "x$D" != "x"; then
|
||||
exit 1
|
||||
else
|
||||
|
|
|
@ -40,7 +40,7 @@ do_install_append_openmn() {
|
|||
}
|
||||
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
set -e
|
||||
|
||||
if [ ! -e $D${sysconfdir}/passwd ] ; then
|
||||
|
|
|
@ -63,12 +63,12 @@ do_install() {
|
|||
chmod 755 ${D}${sysconfdir}/init.d/dropbear
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
update-alternatives --install ${bindir}/scp scp ${sbindir}/dropbearmulti 20
|
||||
update-alternatives --install ${bindir}/ssh ssh ${sbindir}/dropbearmulti 20
|
||||
}
|
||||
|
||||
pkg_postrm_append () {
|
||||
pkg_postrm_append_${PN} () {
|
||||
if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
|
||||
rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
|
||||
fi
|
||||
|
|
|
@ -31,7 +31,7 @@ do_compile_append() {
|
|||
|
||||
FILES_sgml-common_append = " ${datadir}/sgml"
|
||||
|
||||
pkg_postinst() {
|
||||
pkg_postinst_${PN}() {
|
||||
install-catalog \
|
||||
--add ${sysconfdir}/sgml/sgml-ent.cat \
|
||||
${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
|
||||
|
@ -41,7 +41,7 @@ pkg_postinst() {
|
|||
${sysconfdir}/sgml/sgml-ent.cat
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
pkg_postrm_${PN}() {
|
||||
install-catalog \
|
||||
--remove ${sysconfdir}/sgml/sgml-ent.cat \
|
||||
${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
|
||||
|
|
|
@ -27,7 +27,7 @@ do_configure () {
|
|||
oe_runconf
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
touch $D${sysconfdir}/shells
|
||||
grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
|
||||
grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
|
||||
|
|
|
@ -28,7 +28,7 @@ do_configure () {
|
|||
oe_runconf
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
touch $D${sysconfdir}/shells
|
||||
grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
|
||||
grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
|
||||
|
|
|
@ -23,7 +23,7 @@ do_configure_prepend () {
|
|||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
pkg_postinst_${PN} () {
|
||||
if [ "x$D" != "x" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -32,7 +32,7 @@ do_install () {
|
|||
install -m 0644 License.txt ${D}${datadir}/doc/${PN}/
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
#!/bin/sh
|
||||
fc-cache
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ do_install () {
|
|||
install -m 0644 License.txt ${D}${datadir}/doc/${PN}/
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
#!/bin/sh
|
||||
fc-cache
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ do_install () {
|
|||
done
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
#!/bin/sh
|
||||
fc-cache
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ PR = "r8"
|
|||
SRC_URI = "file://update-modules \
|
||||
file://COPYING.GPL"
|
||||
|
||||
pkg_postinst() {
|
||||
pkg_postinst_${PN} () {
|
||||
if [ "x$D" != "x" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue