From dcde034fe657968f9a55bca9060808631492f562 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 7 Feb 2013 11:26:50 +0100 Subject: [PATCH] fix chmod target and visual output --- pxe_riserver_setup.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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." -- 2.39.5