diff options
| author | Simon Rettberg | 2013-11-27 14:54:32 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2013-11-27 14:54:32 +0100 |
| commit | be2e955259f356a1f1b62789f15ed45649f21b04 (patch) | |
| tree | 517474216b715b7b7229efb0bb362d282ea4a322 /server/export_target | |
| parent | [rfs-stage32] Improved slxlog a bit (diff) | |
| parent | [vmchooser] fix wrong path to config file. Fixes wrong theme on startup (diff) | |
| download | tm-scripts-be2e955259f356a1f1b62789f15ed45649f21b04.tar.gz tm-scripts-be2e955259f356a1f1b62789f15ed45649f21b04.tar.xz tm-scripts-be2e955259f356a1f1b62789f15ed45649f21b04.zip | |
Merge branch 'master' of simonslx:openslx-ng/tm-scripts
Diffstat (limited to 'server/export_target')
| -rwxr-xr-x | server/export_target | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/server/export_target b/server/export_target index e5fbce12..ce262538 100755 --- a/server/export_target +++ b/server/export_target @@ -46,11 +46,17 @@ copy_kernel() { sync_remote() { [[ "${#SERVER_BUILD_DIR}" -lt "10" ]] && perror "Safety check failed: SERVER_BUILD_DIR is less than 10 chars. ($SERVER_BUILD_DIR)" - pinfo "Synching '$REMOTE_IP:export/build' to './server/local_builds'..." + pinfo "Synching 'root@$REMOTE_IP:export/build' to '$SERVER_BUILD_DIR'. This might take a while..." #TODO setup link to remote build directory, later this directory will be rsynced or exported to this server... mkdir -p "${SERVER_BUILD_DIR}" || perror "Could not create directory for local copy of remote system ($SERVER_BUILD_DIR)" - rsync -a --numeric-ids --delete -v -e "ssh -oStrictHostKeyChecking=no" "root@$REMOTE_IP:/export/build/*" "$SERVER_BUILD_DIR" || perror "rsync from 'root@$REMOTE_IP:/export/build' to '$SERVER_BUILD_DIR' failed." + rsync -a --numeric-ids --delete -v -e "ssh -oStrictHostKeyChecking=no" "root@$REMOTE_IP:/export/build/*" "$SERVER_BUILD_DIR" + local RET=$? + if [ $RET -eq 0 ]; then + pinfo "Syncing completed." + else + perror "Syncing of 'root@$REMOTE_IP:/export/build' to '$SERVER_BUILD_DIR' failed with error code: $RET. (Is '/export/build' available on target machine?)" + fi } generate_stage32() { @@ -59,10 +65,6 @@ generate_stage32() { pinfo "Writing '${TARGET}.sqfs' to '${SERVER_BOOT_DIR}/${TARGET}.sqfs'" mksquashfs "${SERVER_BUILD_DIR}/${TARGET}/" "${SERVER_BOOT_DIR}/${TARGET}.sqfs" -comp xz -b 1M -no-recovery >&6 || perror "mksquashfs failed ($?)." pinfo "Created '${SERVER_BOOT_DIR}/${TARGET}.sqfs'." - #pinfo "Wrapping squashFS in initramfs-stage32" - #generate_initramfs "${SERVER_BOOT_DIR}/stage32_sqfs" "./mnt/${TARGET}.sqfs" "${SERVER_BOOT_DIR}/initramfs-${TARGET}" - # cleanup - #[ -d "${SERVER_BOOT_DIR}/stage32_sqfs" ] && rm -rf ${SERVER_BOOT_DIR}/stage32_sqfs } generate_stage31() { |
