Advertisement
arter97

Untitled

Oct 10th, 2016
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.09 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. exec > /dev/kmsg 2>&1
  4.  
  5. export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
  6.  
  7. ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h
  8.  
  9. \ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | while read file; do
  10.     echo "performance" > $file
  11. done
  12. \ls /sys/bus/usb/devices/*/power/control | while read file; do
  13.     echo "on" > $file
  14. done
  15.  
  16. find /sys -name add_random -exec sh -c 'echo "0" > {}' \;
  17.  
  18. find /sys/devices -name read_ahead_kb | grep -v virtual | while read file; do echo 512 > $file; done
  19. find /sys/devices -name nr_requests | grep "sd./queue/nr_requests" | while read file; do echo 512 > $file; done
  20.  
  21. ethtool -s eno1 wol g
  22. rfkill block bluetooth
  23.  
  24. . /home/arter97/arter97/init.d/vmtouch
  25.  
  26. apt clean
  27.  
  28. adb start-server
  29.  
  30. echo "init.d: trimming"
  31. cat /etc/fstab | grep -v "#" | grep -v "tmpfs" | grep -v ",discard" | awk '{print $2}' | grep "/" | sort | while read mount; do
  32.     fstrim -v $mount &
  33. done
  34.  
  35. #sleep 60
  36. #killall vmtouch
  37.  
  38. sync
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement