diff options
author | Jonathan Bauer | 2015-11-03 17:07:13 +0100 |
---|---|---|
committer | Jonathan Bauer | 2015-11-03 17:07:13 +0100 |
commit | 9b171e070ddacc07d9ef3596038f55ddbb56f053 (patch) | |
tree | a0ecb03d9f19fc22c0abb5a6b2af8e4ea03f7af1 /remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig | |
parent | Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff) | |
download | tm-scripts-9b171e070ddacc07d9ef3596038f55ddbb56f053.tar.gz tm-scripts-9b171e070ddacc07d9ef3596038f55ddbb56f053.tar.xz tm-scripts-9b171e070ddacc07d9ef3596038f55ddbb56f053.zip |
[rfs-s31] support for SLX_LOCAL_CONFIG
config.tgz should now a 'common' folder with the files needed by ALL clients.
Further, it can contain subfolders with localized files. On bootup, the client
will unpack the subfolder as given by SLX_LOCAL_CONFIG.
EXAMPLE: config.tgz contains 'common' and 'rz'. SLX_LOCAL_CONFIG='rz'
both common/ and rz/ will be extracted to FUTURE_ROOT
TODO: support legacy style config.tgz ? support multiple subfolders to be installed?
Diffstat (limited to 'remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig')
-rw-r--r-- | remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig index 858102d2..3295a92d 100644 --- a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig +++ b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig @@ -63,7 +63,19 @@ HEREEND tar xf "${CONFIG}.tgz" -C "${TEMP_EXTRACT_DIR}" || { echo "Could not untar ${CONFIG}.tgz to ${TEMP_EXTRACT_DIR}"; return 1; } chown -R 0:0 "${TEMP_EXTRACT_DIR}" 2>/dev/null cd "${TEMP_EXTRACT_DIR}" - tar -cp * | tar -xp -C "${FUTURE_ROOT}" + # first extract the common config files found in config.tgz:common/ + if [ -d "common" ]; then + tarcopy "common" "${FUTURE_ROOT}" + echo "Extracted common configuration files." + fi + # now extract the localized part of the config + # this should be under config.tgz:$SLX_LOCAL_CONFIG + # e.g. config.tgz:rzpool + if [ -d "${SLX_LOCAL_CONFIG}" ]; then + tarcopy "${SLX_LOCAL_CONFIG}" "${FUTURE_ROOT}" + echo "Extracted local configuration files for: $SLX_LOCAL_CONFIG" + fi + # cleanup the downloaded stuff cd / rm -rf -- "${TEMP_EXTRACT_DIR}" [ $DEBUG -eq 0 ] && rm -f -- "${CONFIG}.tgz" @@ -74,7 +86,7 @@ HEREEND ######################################################################### # -# MAIN PART +# MAIN PART # fetch_sysconfig |