Browse Source

fix logic by inversion in case variable does not exists at all

master
parent
commit
39d9c4b6ea
  1. 8
      openpkg/rc

8
openpkg/rc

@ -168,13 +168,9 @@ shift
if [ ".$scripts" = ".all" ]; then
. $rcconf
case "$openpkg_ignall" in
[Yy][Ee][Ss] | [Tt][Rr][Uu][Ee] | [Oo][Nn] | 1 )
scripts=`ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;"`
;;
* )
exit 0
;;
[Nn][Oo] | [Ff][Aa][Ll][Ss][Ee] | [Oo][Ff][Ff] | 0 ) exit 0 ;;
esac
scripts=`ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;"`
else
if [ ! -f "$rcdir/rc.$scripts" ]; then
echo "$0:ERROR: script \`$rcdir/rc.$scripts' not found" 1>&2

Loading…
Cancel
Save