Comment 5 for bug 1901820

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to meta-starlingx (master)

Reviewed: https://review.opendev.org/761048
Committed: https://git.openstack.org/cgit/starlingx/meta-starlingx/commit/?id=587e1dbcf2633770a9d6717fe5f84ab6b08de2bd
Submitter: Zuul
Branch: master

commit 587e1dbcf2633770a9d6717fe5f84ab6b08de2bd
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
    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.

    Partial-Bug: 1901820

    Change-Id: I76a74228ed01e78f11876e2ef8901624ab9c6f0c
    Signed-off-by: Jackie Huang <email address hidden>