setup: Add $HOME/bin to .bashrc.
This commit is contained in:
parent
2f968d3be4
commit
ad7cb99cdb
47
centos3.8/setup
Normal file
47
centos3.8/setup
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# https://www.vagrantup.com/docs/boxes/base
|
||||||
|
# https://www.vagrantup.com/docs/providers/virtualbox/boxes
|
||||||
|
|
||||||
|
vboxinstall() {
|
||||||
|
# Harddisk on ATA (not sata)
|
||||||
|
# CD-1..3 on hda hdc hdd
|
||||||
|
# Network interface 1 NAT
|
||||||
|
# Network interface 2..4 NAT
|
||||||
|
# root:vagrant@localhost
|
||||||
|
# vagrant:vagrant
|
||||||
|
# sshkey from https://github.com/hashicorp/vagrant/tree/master/keys
|
||||||
|
VBoxGuestAdditions() {
|
||||||
|
rpm -Uvh /mnt/cdrom3/RedHat/RPMS/kernel-source-2.4.21-47.EL.i386.rpm
|
||||||
|
wget http://download.virtualbox.org/virtualbox/4.3.8/VBoxGuestAdditions_4.3.8.iso
|
||||||
|
sudo mkdir /media/VBoxGuestAdditions
|
||||||
|
sudo mount -o loop,ro VBoxGuestAdditions_4.3.8.iso /media/VBoxGuestAdditions
|
||||||
|
sudo sh /media/VBoxGuestAdditions/VBoxLinuxAdditions.run
|
||||||
|
rm VBoxGuestAdditions_4.3.8.iso
|
||||||
|
sudo umount /media/VBoxGuestAdditions
|
||||||
|
sudo rmdir /media/VBoxGuestAdditions
|
||||||
|
}
|
||||||
|
# Add $HOME/bin to $PATH
|
||||||
|
ssh centos3 'perl -i -pe '"'"'2..2 and s,^,TERM=xterm-color\n,'"'"' .bashrc'
|
||||||
|
# Set TERM to a term that is known by Centos 3
|
||||||
|
ssh centos3 'perl -i -pe '"'"'2..2 and s,^,PATH=\$HOME/bin:\$PATH\n,'"'"' .bashrc'
|
||||||
|
}
|
||||||
|
|
||||||
|
ssh_client() {
|
||||||
|
# Unable to negotiate with 192.168.1.52 port 22: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
|
||||||
|
ssh -c aes256-cbc
|
||||||
|
/etc/ssh/ssh_config.d/aes256-cbc.conf: Ciphers aes256-cbc,aes256-ctr,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
rm -f package.box
|
||||||
|
vagrant package --base Centos3.8
|
||||||
|
vagrant box remove tange/centos3 || true
|
||||||
|
vagrant box add --name tange/centos3 package.box
|
||||||
|
vagrant destroy -f
|
||||||
|
rm -f Vagrantfile
|
||||||
|
vagrant init tange/centos3
|
||||||
|
vagrant up
|
||||||
|
# This should work in Vagrantfile but does not
|
||||||
|
vagrant ssh -c 'sudo ifconfig eth1 172.27.27.3'
|
||||||
|
}
|
2
hpdisk/boot-timing.txt
Normal file
2
hpdisk/boot-timing.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
ssh hpdisk sudo reboot; time wssh hpdisk true = 6m41s
|
||||||
|
|
Loading…
Reference in a new issue