changed COSMOS_REPO to add more -common-dirs
This commit is contained in:
parent
1ff7e5d66b
commit
c167b1ea5c
1 changed files with 13 additions and 2 deletions
|
@ -80,10 +80,21 @@ hostname $cmd_hostname
|
|||
|
||||
# Set up cosmos models. They are in the order of most significant first, so we want
|
||||
# <host> <group (if it exists)> <global>
|
||||
_host_type=`echo $cmd_hostname | cut -d - -f 1`
|
||||
_host_types=`echo $cmd_hostname | awk -F[-.] '
|
||||
{
|
||||
for (i = 1; i <= NF; i++) {
|
||||
if (i > 1)
|
||||
var=var "-"
|
||||
var=var $i
|
||||
print var
|
||||
}
|
||||
}'`
|
||||
|
||||
models=$(
|
||||
echo -n '\\$COSMOS_REPO/'"$cmd_hostname/:"
|
||||
test -d /var/cache/cosmos/repo/${_host_type}-common && echo -n '\\$COSMOS_REPO/'"${_host_type}-common/:"
|
||||
for _i in $_host_types; do
|
||||
test -d /var/cache/cosmos/repo/${_i}-common && echo -n '\\$COSMOS_REPO/'"${_i}-common/:"
|
||||
done
|
||||
echo -n '\\$COSMOS_REPO/global/'
|
||||
)
|
||||
echo "Configuring cosmos with the following models:"
|
||||
|
|
Loading…
Add table
Reference in a new issue