Commit 00e2a755 by Danyi Bence

Merge branch 'master' of ssh://giccero.cloud.ik.bme.hu/cloud

parents 4a508111 11645e31
#!/bin/bash
#rm -f /etc/ssh/ssh_host_*
stop rsyslog
rm -fr /home/cloud/.bash_history /root/.bash_history /var/log/*
#!/bin/bash
echo "En vagyok a $0 !"
hostname "$HOSTNAME"
echo "$HOSTNAME" > /etc/hostname
sed "s/\(127\.0\.1\.1\).*/\1\t$HOSTNAME/" -i /etc/hosts
#!/bin/bash
echo "En vagyok a $0 !"
/etc/init.d/ssh stop
dpkg-reconfigure openssh-server
/etc/init.d/ssh start
#!/bin/bash
echo "En vagyok a $0 !"
echo "$USER:$USERPW" | chpasswd
#!/bin/bash
echo "En vagyok a $0 !"
mkdir -p "$HOME/.ssh"
echo "$SSHPRIV" > $HOME/.ssh/id_rsa
chmod 600 "$HOME/.ssh/id_rsa"
mkdir "$HOME/sshfs"
chown "$USER:$USER" -R "$HOME"
sed -i "s/^\(<\/pam_mount>.*\)/<volume user=\"$USER\" fstype=\"fuse\" path=\"sshfs#${NEPTUN}@${SERVER}:home\" mountpoint=\"~\/sshfs\" options=\"nonempty,reconnect,StrictHostKeyChecking=no\" \/>\n\1/" /etc/security/pam_mount.conf.xml
#!/bin/bash
echo "En vagyok a $0 !"
echo "export NEPTUN=$NEPTUN" >> $HOME/.profile
#!/bin/bash
echo "En vagyok a $0 !"
wget -q -O /dev/null "$BOOTURL"
#!/bin/bash
export BASEDIR=$(dirname $0)
export USER="cloud"
export HOME=$(awk -F: -v u=$USER '$1==u{print $6}' /etc/passwd)
cd "$BASEDIR"
mount -t iso9660 /dev/cdrom1 "$BASEDIR/mnt" 2> /dev/null
if [ $? -eq 0 -a -f "$BASEDIR/firstrun" -a -f "$BASEDIR/mnt/context.sh" ]; then
. "$BASEDIR/mnt/context.sh"
# hogy tudom kiexportalni ennel szebben ezeket a valtozokat?
eval `grep -o '^[a-zA-Z0-9]\+=' "$BASEDIR/mnt/context.sh" | while read x; do echo export ${x%=};done`
run-parts "$BASEDIR/init.d"
rm "$BASEDIR/firstrun"
else
echo "mar korabban lefutott!"
fi
umount /dev/cdrom1 2>/dev/null
eject /dev/cdrom1
exit 0
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
application/nx-session=gedit.desktop; application/nx-session=gedit.desktop;
x-scheme-handler/rdp=rdp.desktop x-scheme-handler/rdp=rdp.desktop
x-scheme-handler/nx=rdp.desktop x-scheme-handler/nx=rdp.desktop
x-scheme-handler/shell=rdp.desktop
[Default Applications] [Default Applications]
text/html=chromium-browser.desktop text/html=chromium-browser.desktop
......
...@@ -127,11 +127,11 @@ nx) ...@@ -127,11 +127,11 @@ nx)
A A
/usr/NX/bin/nxclient --session $f /usr/NX/bin/nxclient --session $f
;; ;;
ssh) shell)
#/usr/NX/bin/nxclient --dialog ok --message "Jelszó: $password" & #/usr/NX/bin/nxclient --dialog ok --message "Jelszó: $password" &
rm /home/user/.ssh/known_hosts #rm /home/user/.ssh/known_hosts
#rxvt-unicode -e sh -c "ssh $user@$host -p$port; sleep 2" #rxvt-unicode -e sh -c "ssh $user@$host -p$port; sleep 2"
rxvt-unicode -e sh -c "sshpass -p "$password" ssh -o StrictHostKeyChecking=no $user@$host -p$port; sleep 2" gnome-terminal -e "sshpass -p "$password" ssh -o StrictHostKeyChecking=no $user@$host -p$port"
;; ;;
*) *)
xmessage "$scheme is not supported." xmessage "$scheme is not supported."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment