--- /dev/null
+#!/bin/bash
+
+# copyright 2012-2013 Marjan Schiller <marjan.schiller@profitbricks.com>
+# GPL2 licenced
+
+set -e
+#set -x
+export
+echo
+
+#
+# check if we have a LIVEBOOT_BUILD_NUMBER
+#
+if [ "$LIVEBOOT_BUILD_NUMBER" != "" ] ; then
+ echo "Ok, got LIVEBOOT_BUILD_NUMBER=$LIVEBOOT_BUILD_NUMBER, which is valid."
+else
+ echo "Fail, no LIVEBOOT_BUILD_NUMBER set."
+ exit 1
+fi
+
+#
+# check if there is an image for it
+#
+if [ -d /srv/mirror/liveboot/liveboot-????????-${LIVEBOOT_BUILD_NUMBER}/ ] ; then
+ SOURCE_DIR=$(ls -d /srv/mirror/liveboot/liveboot-????????-${LIVEBOOT_BUILD_NUMBER}/)
+ echo "Ok, found directory $SOURCE_DIR"
+else
+ figlet "Failure:"
+ echo "/srv/mirror/liveboot/liveboot-????????-${LIVEBOOT_BUILD_NUMBER}/ does not exist."
+ exit 1
+fi
+
+#
+# create pending-approval link and rsync again
+#
+cd /srv/mirror/liveboot
+rm -f pending-approval
+ln -sfv $(basename $SOURCE_DIR) pending-approval
+echo "pending-approval link created, pointing to $SOURCE_DIR"
+
+#
+# finish
+#
+figlet Ok
+