summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2013-04-02 21:46:45 +0200
committersr2013-04-12 19:11:40 +0200
commitb2b7e63a42f01e766b6567f83c5597534e2de500 (patch)
tree8d21636393492252d97beec7d33d160eeb7cf847
parentRemove old remote_builds dir, update .gitignore (diff)
downloadtm-scripts-b2b7e63a42f01e766b6567f83c5597534e2de500.tar.gz
tm-scripts-b2b7e63a42f01e766b6567f83c5597534e2de500.tar.xz
tm-scripts-b2b7e63a42f01e766b6567f83c5597534e2de500.zip
Target 'server' expects remote machine's IP/Hostname as parameter. Add fake remote machine 'local' for local usage.
-rwxr-xr-xmltk13
-rwxr-xr-xserver/export_target3
l---------server/local_builds/local1
3 files changed, 10 insertions, 7 deletions
diff --git a/mltk b/mltk
index 92be9644..35ddac5a 100755
--- a/mltk
+++ b/mltk
@@ -57,7 +57,7 @@ print_usage() {
echo -e ""
echo -e "Toolkit for creating preboot mini-linux for OpenSLX NG (mltk)"
echo -e "Usage: $(basename ${SELF}) remote <target> [-d] [-c [module]*] [-b [module]*] [-p profile]"
- echo -e " $(basename ${SELF}) server [-s] [<target>] [-e stage31|stage32|addons] [-d] [-c]"
+ echo -e " $(basename ${SELF}) server <remotehost> [-s] [<target>] [-e stage31|stage32|addons] [-d] [-c]"
echo -e ""
echo -e " Mode:"
echo -e " server \t server mode: packs stage3.1, stage3.2 or addons as initramfs/squashfs."
@@ -78,14 +78,16 @@ print_usage() {
echo -e " remote stage31 -c -b (clean all modules and build all linked modules in remote/targets/stage31 to remote/builds/stage31)"
echo -e " remote stage32 -c -b rootfs_stage31 sshd (clean all modules, build base, policykit and sshd in remote/builds/stage32)"
echo -e " remote stage32 -c base sshd -b sshd ldm -d (clean base and sshd, build sshd and ldm, be verbose)"
- echo -e " server stage32 -e stage32 (pack stage32 as squashfs+initramfs)"
- echo -e " server stage31 -c (clean stage31 build under server/remote_builds and initramfs under server/boot)"
- echo -e " server addons-eexam -e addons (pack eexam-addons as squashfs)"
+ echo -e " server 1.2.3.4 -s (sync all builds from remote system 1.2.3.4)"
+ echo -e " server 1.2.3.4 stage32 -e stage32 (pack stage32 as squashfs+initramfs from remote system 1.2.3.4)"
+ echo -e " server 1.2.3.4 stage31 -c (clean stage31 build under server/remote_builds and initramfs under server/boot)"
+ echo -e " server 1.2.3.4 addons-eexam -e addons (pack eexam-addons as squashfs)"
echo -e ""
echo -e " Existing targets for remote are:"
echo -e " $(echo $(ls ${ROOT_DIR}/remote/targets 2>/dev/null || echo "No targets for remote found."))"
echo -e " Existing targets for server are:"
echo -e "<TODO: Scan mirrored remote machines and the targets they contain>"
+ echo -e "*** Use 'local' as the remotehost if you're running the server part on the same machine as the remote part ***"
echo -e ""
}
@@ -116,6 +118,9 @@ read_params() {
case "$1" in
server)
MODE="SERVER"
+ [ "$#" -lt "2" ] && perror "Missing argument to -s (expecting remote host)"
+ REMOTE_IP="$2"
+ shift
;;
remote)
MODE="REMOTE"
diff --git a/server/export_target b/server/export_target
index fe8dda18..97e8feb0 100755
--- a/server/export_target
+++ b/server/export_target
@@ -19,9 +19,6 @@ MODE_DIR="${ROOT_DIR}/server"
#files generated by this script land in boot
SERVER_BOOT_DIR="${MODE_DIR}/boot"
-# TODO: Obviously this needs to be a param to script
-REMOTE_IP="132.230.102.104"
-
#builds from remote server
SERVER_BUILD_DIR="${MODE_DIR}/local_builds/${REMOTE_IP}"
#REMOTE_BUILD_DIR="${MODE_DIR}/remote_builds"
diff --git a/server/local_builds/local b/server/local_builds/local
new file mode 120000
index 00000000..194f379c
--- /dev/null
+++ b/server/local_builds/local
@@ -0,0 +1 @@
+../../remote/builds/ \ No newline at end of file