Commit cbd38ed4 authored by Florent Revest's avatar Florent Revest

abootimg, mkbootimg, mkboot, statefs, timed: Use the new pkg_postinst_ontarget...

abootimg, mkbootimg, mkboot, statefs, timed: Use the new pkg_postinst_ontarget syntax of OE sumo instead of the previously used failing pkg_postinst
parent f0b2189d
......@@ -34,30 +34,26 @@ do_install_append() {
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
}
pkg_postinst_kernel-image_append () {
if [ x"$D" = "x" ] ; then
if [ ! -e /boot/boot.img ] ; then
# if the boot image is not available here something went wrong and we don't
# continue with anything that can be dangerous
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
else
pkg_postinst_ontarget_${KERNEL_PACKAGE_NAME}-image_append () {
if [ ! -e /boot/boot.img ] ; then
# if the boot image is not available here something went wrong and we don't
# continue with anything that can be dangerous
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
}
FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img"
......@@ -35,30 +35,26 @@ do_install_append() {
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
}
pkg_postinst_kernel-image_append () {
if [ x"$D" = "x" ] ; then
if [ ! -e /boot/boot.img ] ; then
# if the boot image is not available here something went wrong and we don't
# continue with anything that can be dangerous
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
pkg_postinst_ontarget_${KERNEL_PACKAGE_NAME}-image_append () {
if [ ! -e /boot/boot.img ] ; then
# if the boot image is not available here something went wrong and we don't
# continue with anything that can be dangerous
exit 1
fi
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
else
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
}
FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img"
......@@ -33,30 +33,26 @@ do_install_append() {
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
}
pkg_postinst_kernel-image_append () {
if [ x"$D" = "x" ] ; then
if [ ! -e /boot/boot.img ] ; then
# if the boot image is not available here something went wrong and we don't
# continue with anything that can be dangerous
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
else
pkg_postinst_ontarget_${KERNEL_PACKAGE_NAME}-image_append () {
if [ ! -e /boot/boot.img ] ; then
# if the boot image is not available here something went wrong and we don't
# continue with anything that can be dangerous
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
}
FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img"
......@@ -42,9 +42,7 @@ do_install_append() {
fi
}
pkg_postinst_${PN}() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
pkg_postinst_ontarget_${PN}() {
setcap CAP_SYS_ADMIN=ep /usr/bin/statefs
/usr/lib/statefs/loader-action register /usr/lib/statefs/libloader-default.so
......@@ -57,9 +55,6 @@ if [ x"$D" = "x" ]; then
/usr/lib/statefs/provider-action register /usr/lib/statefs/libprovider-mce.so qt5 --system
/usr/lib/statefs/provider-action register /usr/lib/statefs/libprovider-profile.so qt5
/usr/lib/statefs/provider-action register /etc/timed-statefs.conf inout
else
exit 1
fi
}
FILES_${PN} += "/lib/systemd/ /usr/lib/systemd /var/lib/statefs/ /etc/sysconfig/statefs/ /home/ceres/.config/systemd/user/default.target.wants/"
......
......@@ -31,13 +31,8 @@ do_install_append() {
cp ${WORKDIR}/timed-qt5.conf ${D}/etc/dbus-1/system.d/
}
pkg_postinst_${PN}() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
pkg_postinst_ontarget_${PN}() {
setcap cap_sys_time+ep /usr/bin/timed-qt5
else
exit 1
fi
}
DEPENDS += "pcre systemd tzdata libiodata-native libiodata statefs-qt qtbase tzdata-timed"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment