1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Merge branch 'master' of github.com:RWTH-ACS/S2SS

This commit is contained in:
Steffen Vogel 2015-03-19 17:41:37 +01:00
commit b13e9c528d
5 changed files with 137 additions and 0 deletions

10
contrib/liveusb/chroot.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
mount /dev/sdb1 /media/usb
for part in dev sys proc; do
umount /media/usb/$part
mount -o bind /$part /media/usb/$part
done
chroot /media/usb

View file

@ -0,0 +1,11 @@
[Unit]
Description=dhclient on all interfaces
Wants=network.target
Before=network.target
[Service]
Type=forking
ExecStart=/sbin/dhclient -4
[Install]
WantedBy=network.target

View file

@ -0,0 +1,17 @@
[Unit]
Description=S2SS LiveUSB Image setup
Requires=dhclient.service network.service
After=dhclient.service
[Service]
Type=simple
ExecStart=/s2ss/contrib/liveusb/setup.sh
RemainAfterExit=yes
TimeoutSec=120
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target

43
contrib/liveusb/setup.sh Executable file
View file

@ -0,0 +1,43 @@
#!/bin/bash
set -e
RECEIPENTS="stvogel@eonerc.rwth-aachen.de,mstevic@eonerc.rwth-aachen.de"
FROM="Simulator2Simulator Server <acs@0l.de>"
SERVER=tux.0l.de
USER=acs
PORT=$(shuf -i 60000-65535 -n 1)
IP=$(curl -s http://ifconfig.me)
# check if system has net connectivity. otherwise die...
ssh -q -o ConnectTimeout=2 $USER@$SERVER
# setup SSH tunnel for mail notification
ssh -f -N -L 25:localhost:25 $USER@$SERVER
# setup SSH reverse tunnel for remote administration
ssh -f -N -R $PORT:localhost:22 $USER@$SERVER
# send mail with notification about new node
mail -s "New S2SS node alive: $IP ($HOSTNAME)" -a "From: $FROM" "$RECEIPENTS" <<EOF
There's a new host with the S2SS LiveUSB Image running:
Reverse SSH tunnel port: $PORT
Internet IP: $IP
Hostname: $HOSTNAME
Latency:
$(ping -qc 5 $SERVER)
Traceroute:
$(traceroute $SERVER)
Interfaces:
$(ip addr)
Hardware:
$(lshw)
EOF

View file

@ -0,0 +1,56 @@
authconfig-6.2.6-4.fc20.x86_64
automake-1.13.4-6.fc20.noarch
bash-completion-2.1-3.fc20.noarch
bind-utils-9.9.4-18.P2.fc20.x86_64
biosdevname-0.5.0-2.fc20.x86_64
bzip2-1.0.6-9.fc20.x86_64
dhclient-4.2.7-2.fc20.x86_64
dosfstools-3.0.27-1.fc20.x86_64
dracut-config-rescue-037-11.git20140402.fc20.x86_64
e2fsprogs-1.42.12-3.fc20.x86_64
efibootmgr-0.11.0-1.fc20.x86_64
ftp-0.17-65.fc20.x86_64
gcc-4.8.3-7.fc20.x86_64
gdb-7.7.1-21.fc20.x86_64
gdisk-0.8.10-2.fc20.x86_64
git-svn-1.9.3-2.fc20.x86_64
grub2-2.00-27.fc20.x86_64
htop-1.0.3-3.fc20.x86_64
iptables-services-1.4.19.1-1.fc20.x86_64
kbd-1.15.5-12.fc20.x86_64
kernel-modules-extra-3.18.9-100.fc20.x86_64
kernel-rt-modules-extra-3.14.29-200.rt26.1.fc20.ccrma.x86_64
libconfig-1.4.9-5.fc20.x86_64
lshw-B.02.17-2.fc20.x86_64
lzo-devel-2.08-1.fc20.x86_64
mailx-12.5-11.fc20.x86_64
man-db-2.6.5-6.fc20.x86_64
minicom-2.6.2-4.fc20.x86_64
nano-2.3.2-5.fc20.x86_64
nmap-6.45-1.fc20.x86_64
ntp-4.2.6p5-20.fc20.x86_64
numactl-2.0.9-2.fc20.x86_64
openssh-server-6.4p1-8.fc20.x86_64
openssl-devel-1.0.1e-41.fc20.x86_64
parted-3.1-13.fc20.x86_64
passwd-0.79-2.fc20.x86_64
patch-2.7.1-7.fc20.x86_64
pciutils-devel-3.3.0-1.fc20.x86_64
planetccrma-repo-1.1-3.fc20.ccrma.noarch
policycoreutils-2.2.5-4.fc20.x86_64
psmisc-22.20-3.fc20.x86_64
readline-devel-6.2-10.fc20.x86_64
rootfiles-8.1-16.fc20.noarch
schedtool-1.3.0-9.fc20.x86_64
screen-4.1.0-0.19.20120314git3c2946.fc20.x86_64
setserial-2.17-34.fc20.x86_64
socat-1.7.2.4-1.fc20.x86_64
ssmtp-2.64-14.fc20.x86_64
sudo-1.8.12-1.fc20.x86_64
tar-1.26-31.fc20.x86_64
tcpdump-4.5.1-3.fc20.x86_64
texinfo-5.1-4.fc20.x86_64
traceroute-2.0.20-1.fc20.x86_64
tuned-2.4.1-3.fc20.noarch
wget-1.16.1-2.fc20.x86_64
yum-utils-1.1.31-27.fc20.noarch