diff options
author | user <user@bergwerk> | 2011-07-11 06:21:35 +0000 |
---|---|---|
committer | user <user@bergwerk> | 2011-07-11 06:21:35 +0000 |
commit | b95bc0963f5be17a45600ac4750a721b1ed30e4d (patch) | |
tree | 762d792d7d75049fffbb603bc492aee556d27596 | |
parent | 509e01916006cdbffb27918d49c3f569029a3ddb (diff) | |
parent | cec215157622abd26173fe7b138f6200bbfa29a4 (diff) |
Merge branch 'master' of https://github.com/krebscode/painload
-rwxr-xr-x | mining/bin/archlinux-cruise-control | 34 | ||||
-rwxr-xr-x | mining/bin/newkey.sh | 15 | ||||
-rwxr-xr-x[-rw-r--r--] | mining/user/startup.sh | 15 | ||||
-rwxr-xr-x | noise/modules/espeak | 4 | ||||
-rw-r--r-- | temper/Makefile | 2 |
5 files changed, 39 insertions, 31 deletions
diff --git a/mining/bin/archlinux-cruise-control b/mining/bin/archlinux-cruise-control index d455d10e..de5a0fa4 100755 --- a/mining/bin/archlinux-cruise-control +++ b/mining/bin/archlinux-cruise-control @@ -7,9 +7,22 @@ cp /etc/network.d/examples/ethernet-dhcp /etc/network.d/main echo 'POST_UP="sed -i \"1i nameserver 8.8.8.8\" /etc/resolv.conf"' >> /etc/network.d/main echo "** adding worker account" grep -q worker /etc/passwd || adduser worker +gpasswd -a worker wheel +gpasswd -a worker tty +gpasswd -a worker audio +gpasswd -a worker video +gpasswd -a worker network +gpasswd -a worker power + echo "** adding archlinuxfr to pacman.conf" grep -q archlinuxfr /etc/pacman.conf || echo "[archlinuxfr]" >> /etc/pacman.conf && echo "Server = http://repo.archlinux.fr/x86_64" >> /etc/pacman.conf -pacman --needed --noconfirm -Syu rsync git openssh yajl sudo tmux lm_sensors vim yaourt kernel26-headers +echo "** installing all the required parts" +pacman --needed --noconfirm -Syu rsync git openssh yajl sudo tmux lm_sensors vim yaourt kernel26-headers beep +echo "** doing some tweaks" +rm /usr/bin/python -f +ln -s /usr/bin/python2 /usr/bin/python +echo "syntax on" > /home/worker/.vimrc +echo "syntax on" > /root/.vimrc echo "** installing tinc" [ "`yaourt -Q tinc`" ] || yaourt -S --noconfirm tinc sed -i -e 's/.*\%wheel.*/%wheel ALL=(ALL) NOPASSWD: ALL/1' /etc/sudoers @@ -18,7 +31,10 @@ echo "** Installing ATI drivers" [ "`yaourt -Q catalyst-hook`" ] || yaourt -S --noconfirm catalyst-hook [ "`yaourt -Q amdstream`" ] || yaourt -S --noconfirm amdstream echo "** installing X" -pacman --needed -S --noconfirm xorg-server xorg-apps xorg-appres xorg-xinit xautolock xlockmore xorg-fonts xorg-xhost xorg-xauth xterm rxvt-unicode xorg-twm +pacman --needed -S --noconfirm xorg-server xorg-apps xorg-appres xorg-xinit xautolock xlockmore xorg-fonts xorg-xhost xorg-xauth xterm rxvt-unicode fluxbox slim +echo "** editing slim configuration" +sed -i 's/.*default_user.*/default_user worker/' /etc/slim.conf +sed -i 's/.*auto_login.*/auto_login yes/' /etc/slim.conf echo "** Installing mining tools and overclocking stuff" [ "`yaourt -Q phoenix-miner-svn`" ] || yaourt -S --noconfirm phoenix-miner-svn echo "!! warning, you might need to adjust the version number of AMDOverdriveCTRL !!" @@ -27,6 +43,13 @@ echo "** copying bin folder" cp -r $(readlink -f `dirname $0`)/ /home/worker echo "** creating new .Xauthority for worker" sudo -u worker /home/worker/bin/newkey.sh +mkdir -p /home/worker/.fluxbox +cp /krebs/mining/user/startup.sh /home/worker/startup.sh +chmod a+x /home/worker/startup.sh +cp /krebs/mining/user/startup.sh /home/worker/.fluxbox/startup +chmod a+x /home/worker/.fluxbox/startup +cp /krebs/mining/user/mining.ovdr /home/worker/ +chown -R worker:users /home/worker echo "configuring X" echo "!! ACTION REQUIRED, write down the first number of your ATI Graphics Adapter." echo "!! i will open /etc/X11/xorg.conf for you, change the BusID of every Device to the numbers you see here" @@ -38,7 +61,10 @@ vim /etc/X11/xorg.conf echo "** creating xinitrc and start x" echo 'setxkbmap -option terminate:ctrl_alt_bksp' > /home/worker/.xinitrc echo 'xautolock -corners +-+- -locker "xlock -mode blank"&' >> /home/worker/.xinitrc +echo '/home/worker/startup.sh &' >> /home/worker/.xinitrc echo 'xterm &' >> /home/worker/.xinitrc -echo 'exec twm' >> /home/worker/.xinitrc -echo '!! start x with `xinit -- -auth ~/.Xauthority`' +echo 'exec fluxbox' >> /home/worker/.xinitrc +echo '!! start x with `xinit `' +echo 'add "x:5:respawn:/usr/bin/slim >/dev/null 2>&1" to /etc/inittab to start slim" + diff --git a/mining/bin/newkey.sh b/mining/bin/newkey.sh deleted file mode 100755 index e71ab85b..00000000 --- a/mining/bin/newkey.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -auth=$HOME/.Xauthority -cp /dev/null $auth - -if [ "$1" = "-md5" ]; then - key=`pstat -pfS | md5` -else - key=`perl -e 'srand; printf int(rand(10000000000000))'` - key=$key$key -fi - -xauth add unix:0 . $key - -xauth add ${HOST}:0 . $key diff --git a/mining/user/startup.sh b/mining/user/startup.sh index eb2ce13a..6274a892 100644..100755 --- a/mining/user/startup.sh +++ b/mining/user/startup.sh @@ -1,16 +1,13 @@ -sudo pkill xscreensaver sudo pkill tmux -sleep 1 +sleep 5 +source ~/.profile export DISPLAY=:0 - export URL="${URL-http://txgen_chinaman:lolwut@uk.btcguild.com:8332}" #export URL="http://txgen:qJrXefWX@bitcoinpool.com:8334" -slock & tmux start-server tmux new-session -d -s mining -n mining -printenv > /home/user/environment -tmux new-window -t mining:1 'AMDOverdriveCtrl -i 0 mining.ovdr' -tmux new-window -t mining:2 'AMDOverdriveCtrl -i 3 mining.ovdr' +tmux new-window -t mining:1 'cd ~;AMDOverdriveCtrl -i 0 mining.ovdr' +tmux new-window -t mining:2 'cd ~;AMDOverdriveCtrl -i 3 mining.ovdr' sleep 5 -tmux new-window -t mining:3 "cd /opt/miners/phoenix; while sleep 1; do sudo python phoenix.py -u $URL -k phatk DEVICE=0 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=12 FASTLOOPS=false;done" -tmux new-window -t mining:4 "cd /opt/miners/phoenix; while sleep 1;do sudo python phoenix.py -u $URL -k phatk DEVICE=1 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=10 FASTLOOPS=false ; done" +tmux new-window -t mining:3 "cd /usr/src/phoenix-miner/; while sleep 1; do sudo ./phoenix.py -u $URL -k phatk DEVICE=0 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=12 FASTLOOPS=false;done" +tmux new-window -t mining:4 "cd /usr/src/phoenix-miner/; while sleep 1; do sudo ./phoenix.py -u $URL -k phatk DEVICE=1 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=12 FASTLOOPS=false;done" diff --git a/noise/modules/espeak b/noise/modules/espeak index 97305b5e..815d9d99 100755 --- a/noise/modules/espeak +++ b/noise/modules/espeak @@ -8,7 +8,7 @@ speak() { p="${noise_pitch-100}" v="${noise_lang-de}" k="${noise_capital-0}" - a="${noise_amplitude-100}" + a="${noise_amplitude-600}" g="${noise_gap-1}" if test "$debug" = true; then print_var pitch $p @@ -21,7 +21,7 @@ speak() { echo "espeak: $@" fi #echo "[31mespeak -p \"$pitch\" -v \"$lang\" \"$*\"[m" >&2 - (espeak --stdout -a $a -k $k -p $p -v $v -g $g | aplay -Dplug:dmix)<<EOF + (espeak --stdout -a $a -k $k -p $p -v $v -g $g | aplay)<<EOF $* EOF } diff --git a/temper/Makefile b/temper/Makefile index 18165772..39b124b5 100644 --- a/temper/Makefile +++ b/temper/Makefile @@ -6,7 +6,7 @@ CFLAGS = -O2 -Wall temper: temper.c ${CC} -DUNIT_TEST -o $@ $^ -lusb chmod +s temper - install temper /usr/bin + cp -a temper /usr/bin clean: rm -f temper *.o |