diff options
Diffstat (limited to 'server')
| -rw-r--r-- | server/blacklists/essential/linux-base | 2 | ||||
| -rwxr-xr-x | server/export_target | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/server/blacklists/essential/linux-base b/server/blacklists/essential/linux-base index c8f7c343..85392873 100644 --- a/server/blacklists/essential/linux-base +++ b/server/blacklists/essential/linux-base @@ -39,7 +39,7 @@ - /sbin/halt - /bin/sh # This is where the bind-mount of mltk resides... -- /export/build +- /export/ - /etc/group- - /etc/gshadow - /etc/gshadow- diff --git a/server/export_target b/server/export_target index 6edcecdc..22b8b062 100755 --- a/server/export_target +++ b/server/export_target @@ -25,6 +25,9 @@ SERVER_BUILD_DIR="${MODE_DIR}/local_builds/${REMOTE_IP}" # target directory SERVER_CONFIGS_DIR="${MODE_DIR}/configs" +# allow to specify a different remote export dir via ENV +[ -z $REMOTE_EXPORT_DIR ] && REMOTE_EXPORT_DIR="/export/build" + # initial checks initial_checks() { @@ -46,16 +49,16 @@ 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 'root@$REMOTE_IP:export/build' to '$SERVER_BUILD_DIR'. This might take a while..." + pinfo "Synching 'root@$REMOTE_IP:$REMOTE_EXPORT_DIR' 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 --exclude '**/.mltk' --delete --delete-excluded -v -e "ssh -c arcfour -oStrictHostKeyChecking=no" "root@$REMOTE_IP:/export/build/*" "$SERVER_BUILD_DIR" + rsync -a --numeric-ids --exclude '**/.mltk' --delete --delete-excluded -v -e "ssh -c arcfour -oStrictHostKeyChecking=no" "root@$REMOTE_IP:$REMOTE_EXPORT_DIR/*" "$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? If not run './mltk -n' on remote machine to export the build directory.)" + perror "Syncing of 'root@$REMOTE_IP:$REMOTE_EXPORT_DIR' to '$SERVER_BUILD_DIR' failed with error code: $RET. (Is '$REMOTE_EXPORT_DIR' available on target machine? If not run './mltk -n' on remote machine to export the build directory.)" fi } |
