From: Thierry Parmentelat Date: Wed, 4 Apr 2012 14:14:46 +0000 (+0200) Subject: provides a means to declare in /var/www/html/install-rpms/PACKAGES the X-Git-Tag: nodeimage-2.1-1~3 X-Git-Url: http://git.onelab.eu/?p=nodeimage.git;a=commitdiff_plain;h=8701ed06737ebb5f3457a8768f01243865e3ed7a provides a means to declare in /var/www/html/install-rpms/PACKAGES the list of repos that should be subject to /etc/plc.d/packages rehashing --- diff --git a/plc.d/packages b/plc.d/packages index 56c0450..77dcbf4 100755 --- a/plc.d/packages +++ b/plc.d/packages @@ -108,12 +108,21 @@ case "$1" in mode=$1; shift - if [[ -z "$@" ]] ; then - # use all subdirs in install-rpms by default - repositories=/var/www/html/install-rpms/* - else - # else use argv + # on PLC there is a need to select the repos as there are quite a few in there + # would contain names or patterns relative to install-rpms + explicit_list=/var/www/html/install-rpms/PACKAGES + + # use argv if provided + if [[ -n "$@" ]] ; then repositories="$@" + elif [ -f $explicit_list ] ; then + repositories="" + for name in $(grep -v '#' $explicit_list); do + repositories="$repositories /var/www/html/install-rpms/$name" + done + else + # use all subdirs in install-rpms by default + repositories=/var/www/html/install-rpms/* fi ##########