From: Holger Levsen Date: Thu, 7 Feb 2013 10:26:50 +0000 (+0100) Subject: fix chmod target and visual output X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=dcde034fe657968f9a55bca9060808631492f562;p=profitbricks%2Fjenkins-build-scripts.git fix chmod target and visual output --- diff --git a/pxe_riserver_setup.sh b/pxe_riserver_setup.sh index e424319..3f7956e 100755 --- a/pxe_riserver_setup.sh +++ b/pxe_riserver_setup.sh @@ -5,6 +5,7 @@ #set -x export +echo if [ "$4" = "" ] || ( [ "$4" != "install" ] && [ "$4" != "sysinfo" ] && [ "$4" != "localboot" ] ) ; then echo "$0 must be called with exactly four arguments: hostname mac networkdevice action" @@ -18,6 +19,15 @@ TARGET_MAC=$2 TARGET_DEV=$3 TARGET_ACTION=$4 +echo "Re-configuring PXE on riserver:" +echo +echo " NIC: $TARGET_MAC (hostname: $TARGET_HOST) on $TARGET_DEV" +echo +echo " next PXE boot will result in: $TARGET_ACTION" +echo +echo +echo + TMPFILE=$(mktemp) cat > $TMPFILE <<-EOF # Generated automatically by jenkins - don't edit manually, it will be overwritten @@ -42,10 +52,10 @@ EOF cat $TMPFILE echo - +echo echo "Copying PXE configuration for $TARGET_HOST to riserver..." scp $TMPFILE riserver:/srv/tftp/pxelinux.cfg/$TARGET_MAC -ssh riserver chmod 755 riserver:/srv/tftp/pxelinux.cfg/$TARGET_MAC +ssh riserver chmod 755 /srv/tftp/pxelinux.cfg/$TARGET_MAC rm $TMPFILE - +echo echo "Enjoy."