summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backup.sh2
-rwxr-xr-xch4
-rwxr-xr-xfirefox-youtube-handler4
-rwxr-xr-xqinit4
-rw-r--r--setup-arch-vm5
-rwxr-xr-xsftp-mount.sh18
-rwxr-xr-xxo3
7 files changed, 22 insertions, 18 deletions
diff --git a/backup.sh b/backup.sh
index 9eef9f3..66fc1fe 100644
--- a/backup.sh
+++ b/backup.sh
@@ -35,5 +35,5 @@ backup() {
#export PASSPHRASE
backup / sftp://backup/backup/root/ --exclude-globbing-filelist /root/duplicity_root_filter
backup /home/ sftp://backup/backup/home/ --exclude-globbing-filelist /root/duplicity_home_filter
-backup /boot/ sftp://backup/backup//boot/
+backup /boot/ sftp://backup/backup/boot/
#export PASSPHRASE=""
diff --git a/ch b/ch
index cc760c5..5d5489e 100755
--- a/ch
+++ b/ch
@@ -110,10 +110,10 @@ chbuild() {
chinstall() {
__chrootalias $1 || return; shift
for file in "$@"; do
- files+=("$(readlink -f "$file")")
+ files+=(-I "$(readlink -f "$file")")
done
cd /var/empty
- linux${chroot_arch} sudo makechrootpkg -l "${copydir##*/}" -r "$chrootdir" -I "${files[@]}"
+ linux${chroot_arch} sudo makechrootpkg -l "${copydir##*/}" -r "$chrootdir" "${files[@]}"
}
chclean() {
diff --git a/firefox-youtube-handler b/firefox-youtube-handler
index 51ea0ec..d9332fe 100755
--- a/firefox-youtube-handler
+++ b/firefox-youtube-handler
@@ -4,10 +4,10 @@ url=$1
id=${url##$proto}
#audiourl="$(youtube-dl -g -f 141/140 "$id")"
-#videourl="$(youtube-dl -g -f 137/136/135/134 "$id")"
+#videourl="$(youtube-dl -g -f 138/264/137/136/135/134 "$id")"
#vlc "$videourl" --input-slave "$audiourl"
-#mpv "$videourl" --audiofile "$audiourl"
+#mpv --msglevel=all=debug "$videourl" --audiofile "$audiourl"
#mplayer "$videourl" -audiofile "$audiourl"
# max 720p because youtube serves 1080p only via DASH (seperate audio/video streams)
diff --git a/qinit b/qinit
index 15eab3e..5054763 100755
--- a/qinit
+++ b/qinit
@@ -36,7 +36,7 @@ declare net="-netdev bridge,br=virbr1,id=mynet0 -device virtio-net,netdev=mynet0
cdrom+=("-boot" "d")
#declare cdrom="-cdrom $isoroot/archlinux-2012.11.01-dual.iso -boot d"
-for iso in "$isoroot/"archlinux-*.iso; do
+for iso in "$isoroot/"*.iso; do
cdrom+=("-cdrom" "$iso")
done
### Launcher #############################
@@ -75,5 +75,5 @@ if (( ${#drives[*]} == 0 )); then
done
fi
-exec qemu-system-x86_64 --machine type=pc,accel=kvm -boot order=dcn "${opts[@]}" $cpus $mem "${drives[@]}" $net ${usecdrom:+${cdrom[@]}} "$@"
+exec qemu-system-x86_64 -monitor stdio --machine type=pc,accel=kvm -boot order=dcn "${opts[@]}" $cpus $mem "${drives[@]}" $net ${usecdrom:+${cdrom[@]}} "$@"
diff --git a/setup-arch-vm b/setup-arch-vm
index e6a19f6..db67d09 100644
--- a/setup-arch-vm
+++ b/setup-arch-vm
@@ -33,6 +33,8 @@ cmdline_arg() {
grep -qE '^flags\s+: .* hypervisor( |$)' /proc/cpuinfo || die "Not running in hypervisor. aborting automatic setup"
+dhcpcd -b eth0
+
# wait for host to be reachable (including dns query)
while ! ping -c1 -W0.3 "$pingcheckhost" >/dev/null; do
sleep 0.2
@@ -62,8 +64,6 @@ Name=e*
$(get_url "http://$server/network/$hostname")
EOF
-ln -sf /run/systemd/network/resolv.conf /mnt/etc/resolv.conf
-
ln -s /usr/share/zoneinfo/Europe/Vienna /mnt/etc/localtime
echo "en_US.UTF-8 UTF-8" > /mnt/etc/locale.gen
arch-chroot /mnt locale-gen
@@ -128,6 +128,7 @@ curl https://git.server-speed.net/users/flo/bin/plain/init_new_user.sh | arch-ch
arch-chroot /mnt chsh -s /bin/zsh $newuser
arch-chroot /mnt systemctl enable multi-user.target sshd haveged systemd-networkd
+ln -sf /run/systemd/network/resolv.conf /mnt/etc/resolv.conf
sync
systemctl reboot
diff --git a/sftp-mount.sh b/sftp-mount.sh
index e2fb3ae..9418146 100755
--- a/sftp-mount.sh
+++ b/sftp-mount.sh
@@ -2,12 +2,14 @@
set -e
-mnt=~/mnt/$1
+for i in "$@"; do
+ mnt=~/mnt/$i
-if ! mountpoint -q $mnt; then
- mkdir -p $mnt
- sshfs web-$1@karif: $mnt
-else
- fusermount -u $mnt
- rmdir $mnt
-fi
+ if ! mountpoint -q $mnt; then
+ mkdir -p $mnt
+ sshfs web-$i@karif: $mnt
+ else
+ fusermount -u $mnt
+ rmdir $mnt
+ fi
+done
diff --git a/xo b/xo
index 4beaecc..c645502 100755
--- a/xo
+++ b/xo
@@ -17,7 +17,8 @@ declare -A handler
# when a major MIME type won't correctly identify all filetypes.
# openoffice.org documents are an example of this.
doc=soffice
-image="sxiv -Z"
+#image="sxiv -Z"
+image=viewnior
video=mplayer
default=${EDITOR:-vi} # Fallback -- should be a text editor