From ba38291a468363fe3267313b760ae0522616254b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 13 Sep 2017 11:40:16 +0200 Subject: misc Signed-off-by: Florian Pritz --- create-new-vm.sh | 5 +++-- setup-arch-vm | 6 +++--- upgrade_pg.sh | 0 vpn-connect | 5 ++--- xo | 1 + 5 files changed, 9 insertions(+), 8 deletions(-) mode change 100644 => 100755 upgrade_pg.sh diff --git a/create-new-vm.sh b/create-new-vm.sh index 8419ff1..7e3169f 100755 --- a/create-new-vm.sh +++ b/create-new-vm.sh @@ -17,8 +17,8 @@ fi cat <vm.xml $name - 1048576 - 1048576 + 2097152 + 2097152 4 hvm @@ -54,6 +54,7 @@ cat <vm.xml + diff --git a/setup-arch-vm b/setup-arch-vm index 2dac5b1..226956e 100644 --- a/setup-arch-vm +++ b/setup-arch-vm @@ -40,7 +40,7 @@ done parted -s -- $disk mklabel msdos mkpart primary 1 -0 -mkfs.ext4 ${disk}1 +mkfs.btrfs ${disk}1 mount ${disk}1 /mnt cat </etc/pacman.d/mirrorlist Server = http://mirror.server-speed.net/\$repo/os/\$arch @@ -49,7 +49,7 @@ EOF pacstrap /mnt base syslinux sudo openssh haveged htop git zsh screen dnsutils vim net-tools genfstab -p /mnt >> /mnt/etc/fstab -mymac=$(ip addr show dev eth0 | sed -rn 's#^\s+link/ether ([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}).*$#\1#p') +mymac=$(ip addr show dev ens3 | sed -rn 's#^\s+link/ether ([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}).*$#\1#p') get_url "http://$server/hostnames/$mymac" "archvm" > /mnt/etc/hostname hostname=$(cat /mnt/etc/hostname) @@ -62,7 +62,7 @@ Name=e* $(get_url "http://$server/network/$hostname") EOF -ln -s /usr/share/zoneinfo/Europe/Vienna /mnt/etc/localtime +ln -sf /usr/share/zoneinfo/Europe/Vienna /mnt/etc/localtime echo "en_US.UTF-8 UTF-8" > /mnt/etc/locale.gen arch-chroot /mnt locale-gen diff --git a/upgrade_pg.sh b/upgrade_pg.sh old mode 100644 new mode 100755 diff --git a/vpn-connect b/vpn-connect index 70afefd..fef8fea 100755 --- a/vpn-connect +++ b/vpn-connect @@ -3,9 +3,8 @@ #vpnc --password-helper "$HOME/bin/vpn-getpass" tu.conf #vpn-getpass | sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --passwd-on-stdin -b -i vpntun0 vpn.tuwien.ac.at -vpn-getpass | sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --passwd-on-stdin -b -i vpntun0 vpn.tuwien.ac.at - -sleep 1 +## need to run this in shell: sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --syslog -i vpntun0 vpn.tuwien.ac.at +#vpn-getpass | sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --passwd-on-stdin -b --syslog -i vpntun0 vpn.tuwien.ac.at sudo ip route delete default dev vpntun0 sudo ip route add default via 192.168.4.1 dev br0 diff --git a/xo b/xo index c645502..9935cd4 100755 --- a/xo +++ b/xo @@ -27,6 +27,7 @@ handler[inode/directory]=dolphin handler[application/pdf]=evince handler[application/vnd.oasis.opendocument.text]=$doc handler[application/xml]=firefox +handler[scad]=openscad handler[doc]=$doc handler[image]=$image handler[odb]=$doc -- cgit v1.2.3-24-g4f1b