From f80dff40dd80d4775e66fc4cbb557b56cfea7aa6 Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Wed, 17 Oct 2018 07:19:34 +0000 Subject: [PATCH] don't run ldconfig if etc doesn't exist --- zpm-install | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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:-/} -- 2.40.0