diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-06-03 12:28:41 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2014-06-03 12:28:41 +0200 |
commit | 3774c0948ac1216765c15ede8839f52f5fb9e7b9 (patch) | |
tree | 4b1d16df352b36cf141c8731baa37cfa3cf4b142 | |
parent | 7fba334e4fe21133141125ac77185ab9a0b22f2c (diff) | |
download | bin-3774c0948ac1216765c15ede8839f52f5fb9e7b9.tar.gz bin-3774c0948ac1216765c15ede8839f52f5fb9e7b9.tar.xz |
misc changes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | backup.sh | 2 | ||||
-rwxr-xr-x | ch | 4 | ||||
-rwxr-xr-x | firefox-youtube-handler | 4 | ||||
-rwxr-xr-x | qinit | 4 | ||||
-rw-r--r-- | setup-arch-vm | 5 | ||||
-rwxr-xr-x | sftp-mount.sh | 18 | ||||
-rwxr-xr-x | xo | 3 |
7 files changed, 22 insertions, 18 deletions
@@ -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="" @@ -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) @@ -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 @@ -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 |