From d8692aab29a112d6dc3cb492460bc4b36eff2d6f Mon Sep 17 00:00:00 2001 From: Alessandro Elias Date: Fri, 19 Feb 2016 16:10:08 +0000 Subject: Fixed path to config, new name /etc/openslx. Signed-off-by: Alessandro Elias --- builder/hd-boot/common-lib.sh | 3 ++- builder/hd-boot/hooks/get_root_part.sh | 4 ++-- builder/hd-boot/hooks/partitioner.sh | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/builder/hd-boot/common-lib.sh b/builder/hd-boot/common-lib.sh index 0ab2229c..e6c0b7d9 100644 --- a/builder/hd-boot/common-lib.sh +++ b/builder/hd-boot/common-lib.sh @@ -1,6 +1,6 @@ PREFIX_DIALRC=/usr/lib/rebash DNBD3_CONFIG_DIR=/etc/dnbd3 -CONFIG_FILE_NAME="config" +CONFIG_FILE_NAME="openslx" perror () { if [[ "$1" == .dialog_[a-zA-Z]*$rc ]]; then @@ -64,3 +64,4 @@ get_root_dir() get_cache_dir() { echo "$(cat ${DNBD3_CONFIG_DIR}/server.conf | awk -F'=' '/basePath/ {print $2}')"; } +alias perror=pdebug diff --git a/builder/hd-boot/hooks/get_root_part.sh b/builder/hd-boot/hooks/get_root_part.sh index feed6f5f..ee84ea9d 100755 --- a/builder/hd-boot/hooks/get_root_part.sh +++ b/builder/hd-boot/hooks/get_root_part.sh @@ -16,9 +16,9 @@ SLX_PART_ID=0x49 SLX_GPT_PART_NAME=hddbwlehrpool -CONFIG_FILE_NAME="config" +CONFIG_FILE_NAME="openslx" if [ -f "${SLX_CONFIGURATION_LOCATION}/${CONFIG_FILE_NAME}" ]; then - source "${SLX_CONFIGURATION_LOCATION}/${CONFIG_FILE_NAME}" + . "/etc/${CONFIG_FILE_NAME}" fi # Param - none diff --git a/builder/hd-boot/hooks/partitioner.sh b/builder/hd-boot/hooks/partitioner.sh index 22d31258..21e12a94 100755 --- a/builder/hd-boot/hooks/partitioner.sh +++ b/builder/hd-boot/hooks/partitioner.sh @@ -36,10 +36,10 @@ set FS_TYPE FS_TYPE=ext4 -if [ -f "${SLX_CONFIGURATION_LOCATION}/$CONFIG_FILE_NAME" ]; then - source "${SLX_CONFIGURATION_LOCATION}/$CONFIG_FILE_NAME" +if [ -f "/etc/$CONFIG_FILE_NAME" ]; then + . "/etc/$CONFIG_FILE_NAME" else - warn "Config file could no be fould at ${SLX_CONFIGURATION_LOCATION}/$CONFIG_FILE_NAME" + die "Config file could no be fould at /etc/$CONFIG_FILE_NAME" fi get_size_of_parts() { -- cgit v1.2.3-55-g7522