The pkg_postinst_ontarget adds the following into the post
install script:
"""
if [ -n "$D" ]; then $INTERCEPT_DIR/postinst_intercept delay_to_first_boot %s mlprefix=%s
exit 0
fi
"""
Which doesn't work when installing packages with anaconda and failed with:
line 24: /postinst_intercept: No such file or directory
So change to pkg_postinst and do the following to ensure the post install
script run successfully both in do_rootfs and with anaconda:
* "networking" is a sysv init script, no systemd service file, systemd
command actually calls update-rc.d to enable the service, so change to
use update-rc.d command directly.
* Use different OPT according to the content of $D.
Reviewed: https:/ /review. opendev. org/761048 /git.openstack. org/cgit/ starlingx/ meta-starlingx/ commit/ ?id=587e1dbcf26 33770a9d6717fe5 f84ab6b08de2bd
Committed: https:/
Submitter: Zuul
Branch: master
commit 587e1dbcf263377 0a9d6717fe5f84a b6b08de2bd
Author: Jackie Huang <email address hidden>
Date: Mon Nov 2 22:49:32 2020 +0800
systemd- compat- units: fix the post install script
The pkg_postinst_ ontarget adds the following into the post
$INTERCEPT_ DIR/postinst_ intercept delay_to_first_boot %s mlprefix=%s intercept: No such file or directory
install script:
"""
if [ -n "$D" ]; then
exit 0
fi
"""
Which doesn't work when installing packages with anaconda and failed with:
line 24: /postinst_
So change to pkg_postinst and do the following to ensure the post install
script run successfully both in do_rootfs and with anaconda:
* "networking" is a sysv init script, no systemd service file, systemd
command actually calls update-rc.d to enable the service, so change to
use update-rc.d command directly.
* Use different OPT according to the content of $D.
Partial-Bug: 1901820
Change-Id: I76a74228ed01e7 8f11876e2ef8901 624ab9c6f0c
Signed-off-by: Jackie Huang <email address hidden>