Michal Marek 3f07da
#!/bin/bash
Michal Marek 3f07da
Michal Marek 3f07da
echo "This script disables pushing of the internal git tree to public mirrors. Use it"
Michal Marek 3f07da
echo "if an embargoed security fix has been accidentally pushed to a public branch."
Michal Marek 3f07da
echo "Please describe the reason to cancel mirroring (hit Return to cancel):"
Michal Marek 3f07da
read -p "> " -e
Michal Marek 3f07da
if test -z "$REPLY"; then
Michal Marek 3f07da
	echo "No reason given, exiting"
Michal Marek 3f07da
	exit 1
Michal Marek 3f07da
fi
Michal Marek 3f07da
Michal Marek e52fa9
(set -x; curl -d "reason=$REPLY" http://kerncvs.suse.de/stop-sync.cgi)
Michal Marek 3f07da
res=$?
Michal Marek 3f07da
if test $res -ne 0; then
Michal Marek 3f07da
	echo "The curl command failed. Please check your vpn config before panicking."
Michal Marek 3f07da
fi
Michal Marek 3f07da
exit $res
Michal Marek 3f07da