This file contains 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/bash | |
################################################################ | |
#script to trigger this script | |
# for i in {1..84} | |
# do | |
# scp AutoNetconf.sh 10.5.101.$i:~/ | |
# ssh 10.5.101.$i "sh AutoNetConf.sh $i" | |
# done | |
################################################################ | |
IPID=$1 |
This file contains 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
#!/usr/bin/env perl | |
our @empty=(b..x); | |
our @full= (a); | |
my $round = 1; | |
OUT:while(1) | |
{ | |
print "#############\n"; | |
foreach my $s (@full){ |
This file contains 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
[general] | |
# Path to a Public key to install on servers. If a usable key has not | |
# been installed on the remote servers the user will be prompted for a | |
# password and this key will be installed so the password will not be | |
# required again | |
CONFIG_SSH_KEY= | |
# Set to 'y' if you would like Packstack to install MySQL | |
CONFIG_MYSQL_INSTALL=y |
This file contains 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/bash | |
usage(){ | |
echo "$0 ip | |
egg $0 10.0.50.171 | |
" | |
exit 1 | |
} | |
if [[ $# != 1 ]] | |
then |
This file contains 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
perl -p -i -e "s/^.*PasswordAuthentication.*$/PasswordAuthentication yes/" /etc/ssh/sshd_config | |
perl -p -i -e "s/^.*PermitRootLogin.*$/PermitRootLogin yes/" /etc/ssh/sshd_config | |
service sshd restart |
This file contains 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
mkdir -p /cloudview/cvm/ | |
qemu-img convert -f qcow2 cvm.qcow2 -O raw /cloudview/cvm/cvm.raw | |
virt-install --hvm --name coc --ram 4096 --vcpus 4 \ | |
--disk path=/cloudview/cvm/cvm.raw --os-type "linux" --network bridge=br0 --boot hd | |
This file contains 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/bash | |
usage(){ | |
echo " Usage :$0 10.0.50.181 10.0.50.254" | |
echo "Description: set ipmi ip and gateway" | |
exit 1 | |
} | |
if [ $# == 0] | |
then | |
usage | |
fi |
This file contains 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/bash | |
expect -c " | |
set timeout 10 | |
spawn virsh console cvm1 | |
expect { | |
\"Escape character\" {send \"\r\r\" ; exp_continue} | |
\"Escape character\" {send \"\r\r\" ; exp_continue} | |
\"login:\" {send \"root\r\"; exp_continue} | |
\"Password:\" {send \"111111\r\";} |
This file contains 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
########################################################### | |
#!/usr/bin/perl -w | |
# this script printf to stdout and stderr. It prints random | |
# characters and does not flush the output of stdout. stderr | |
# is autoflushed by default. | |
# uncomment the line about autoflush STDOUT to see how that | |
# changes the behavior. Also, you can uncomment the sleep | |
# line to watch the script in slow motion. |
This file contains 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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Maintainer: | |
" Amir Salihefendic | |
" http://amix.dk - [email protected] | |
" | |
" Version: | |
" 5.0 - 29/05/12 15:43:36 | |
" | |
" Blog_post: | |
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github |