Created
November 9, 2012 06:58
-
-
Save mizzy/4044138 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| mount_point=/mnt/vm | |
| if test ! -d $mount_point; then | |
| mkdir -p $mount_point | |
| fi | |
| for vm in `virsh list --all|grep -v running|grep original|awk '{print $2}'` | |
| do | |
| echo "Set routing on $vm ..." | |
| guestmount -d $vm -i $mount_point | |
| grep route.pl $mount_point/etc/rc.d/rc.local > /dev/null | |
| if test $? -ne 0; then | |
| echo "curl https://raw.github.com/gist/3824987/routes.pl | perl" >> $mount_point/etc/rc.d/rc.local | |
| fi | |
| umount $mount_point | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment