redirect unwanted error message in nginx install

if we run opkg install nginx on our system (without systemd)
we end up getting the following message in the install process

$ opkg install nginx_1.20.1-r0_core2-64.ipk 
...
//var/lib/opkg/info/nginx.postinst: line 3: type: systemd-tmpfiles: not found

this confused some of my coworkers.
as installation also finishes correctly without sytemd-tmpfiles
and not having systemd-tempfiles is not really a problem, I think
we should redirect the message also to /dev/NULL

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Johannes Kirchmair 2023-03-16 16:37:24 +01:00 committed by Khem Raj
parent 9357ea2698
commit 356b224344

View File

@ -148,7 +148,7 @@ do_install () {
pkg_postinst:${PN} () {
if [ -z "$D" ]; then
if type systemd-tmpfiles >/dev/null; then
if type systemd-tmpfiles >/dev/null 2>&1; then
systemd-tmpfiles --create
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update