From ad7cb99cdba1216cc8a798cdaf63f5f5c1b103d6 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 29 Nov 2020 02:06:21 +0100 Subject: [PATCH] setup: Add $HOME/bin to .bashrc. --- centos3.8/setup | 47 ++++++++++++++++++++++++++++++++++++++++++ hpdisk/boot-timing.txt | 2 ++ 2 files changed, 49 insertions(+) create mode 100644 centos3.8/setup create mode 100644 hpdisk/boot-timing.txt diff --git a/centos3.8/setup b/centos3.8/setup new file mode 100644 index 0000000..5521ba3 --- /dev/null +++ b/centos3.8/setup @@ -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' +} diff --git a/hpdisk/boot-timing.txt b/hpdisk/boot-timing.txt new file mode 100644 index 0000000..9b73bbf --- /dev/null +++ b/hpdisk/boot-timing.txt @@ -0,0 +1,2 @@ +ssh hpdisk sudo reboot; time wssh hpdisk true = 6m41s +