From: Nathan Wagner Date: Wed, 17 Oct 2018 07:19:34 +0000 (+0000) Subject: don't run ldconfig if etc doesn't exist X-Git-Tag: v0.2.16~86 X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=f80dff40dd80d4775e66fc4cbb557b56cfea7aa6 don't run ldconfig if etc doesn't exist --- diff --git a/zpm-install b/zpm-install index d0f2f32..815d610 100755 --- a/zpm-install +++ b/zpm-install @@ -1,5 +1,9 @@ #!/bin/sh +warn() { + echo $* 1>&2 +} + die() { echo $* 1>&2 exit 1 @@ -213,7 +217,9 @@ for pkgstr in "$@"; do fi if [ $(id -u) -eq 0 ]; then - if [ -f $rootdir/sbin/ldconfig ]; then + if [ ! -d $rootdir/etc ]; then + warn "no etc directory in $rootdir, skipping ldconfig" + elif [ -f $rootdir/sbin/ldconfig ]; then $rootdir/sbin/ldconfig -r ${rootdir:-/} elif [ -f /sbin/ldconfig ]; then /sbin/ldconfig -r ${rootdir:-/}