From d1be2b4aae769dc42b8dee38ebac5439458207ff Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 23 Aug 2019 07:48:10 +0100 Subject: sys-devel/prelink: ignore warnings from 'ldd /sbin/init' /sbin/init might not exist at all. Let's not generate text output in this case. Reported-by: Anthony Parsons Closes: https://bugs.gentoo.org/678348 Package-Manager: Portage-2.3.72, Repoman-2.3.17 Signed-off-by: Sergei Trofimovich --- sys-devel/prelink/files/prelink.cron | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys-devel/prelink') diff --git a/sys-devel/prelink/files/prelink.cron b/sys-devel/prelink/files/prelink.cron index a3edc429fee7..067fc2ea97a2 100644 --- a/sys-devel/prelink/files/prelink.cron +++ b/sys-devel/prelink/files/prelink.cron @@ -55,7 +55,7 @@ fi echo /usr/sbin/prelink -av $PRELINK_OPTS > ${log} /usr/sbin/prelink -av $PRELINK_OPTS >> ${log} 2>&1 \ || echo Prelink failed with return value $? >> ${log} -# Restart init if needed -[ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u +# Restart init if needed (and if exists) +[ -n "$(find `ldd /sbin/init 2>/dev/null | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u exit 0 -- cgit v1.2.3-65-gdbad