瀏覽代碼

startup.sh: Ensure SCHEMAS is sorted

`find` doesn't sort the output, but if you don't sort it and two schema files are dependent on each other (schema 2 uses an attribute defined in schema 1) the startup of the container will fail. By sorting it you can know/rely on asciibetical sorting to ensure the schema files get included in the right order.
Daniele Sluijters 7 年之前
父節點
當前提交
acfbcc8414
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      image/service/slapd/startup.sh

+ 1 - 1
image/service/slapd/startup.sh

@@ -214,7 +214,7 @@ EOF
 
       # convert schemas to ldif
       SCHEMAS=""
-      for f in $(find ${CONTAINER_SERVICE_DIR}/slapd/assets/config/bootstrap/schema -name \*.schema -type f); do
+      for f in $(find ${CONTAINER_SERVICE_DIR}/slapd/assets/config/bootstrap/schema -name \*.schema -type f|sort); do
         SCHEMAS="$SCHEMAS ${f}"
       done
       ${CONTAINER_SERVICE_DIR}/slapd/assets/schema-to-ldif.sh "$SCHEMAS"