From: Sergei Trofimovich Date: Fri, 23 Aug 2019 06:48:10 +0000 (+0100) Subject: sys-devel/prelink: ignore warnings from 'ldd /sbin/init' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d1be2b4aae769dc42b8dee38ebac5439458207ff;p=gentoo.git 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 --- 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