diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-07-04 08:17:21 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-07-04 08:17:23 +0200 |
commit | fe998cc77c1befc38888ffcce29848a04524b2fa (patch) | |
tree | fe6d9c74051b0c5be0163320a19f35cdf58eac0b | |
parent | d7c75330a2e672b55e21fd7c6c24d5eb34a1bcd9 (diff) | |
download | ptxdist-fe998cc77c1befc38888ffcce29848a04524b2fa.tar.gz ptxdist-fe998cc77c1befc38888ffcce29848a04524b2fa.tar.xz |
ptxd_make_xpkg_prepare: allow /dev/null overwrites for pre/post scripts
Allow disabling {pre,post}{inst,rm} scripts by providing a local symlink to
/dev/null.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_prepare.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_xpkg_prepare.sh b/scripts/lib/ptxd_make_xpkg_prepare.sh index e7c2f1009..7c669d842 100644 --- a/scripts/lib/ptxd_make_xpkg_prepare.sh +++ b/scripts/lib/ptxd_make_xpkg_prepare.sh @@ -98,7 +98,8 @@ install_init: @DEPENDS@ -> ${dep}" for script in preinst postinst prerm postrm; do echo -n "install_init: ${script} " - if ptxd_in_path PTXDIST_PATH_RULES "${pkg_xpkg}.${script}"; then + if ptxd_in_path PTXDIST_PATH_RULES "${pkg_xpkg}.${script}" && \ + [ ! -h "${ptxd_reply}" -o "$(readlink "${ptxd_reply}")" != /dev/null ]; then install -m 0755 \ -D "${ptxd_reply}" \ "${pkg_xpkg_control_dir}/${script}" || return |