saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
9
hprofile/profiles/disk/ata.bash
Normal file
9
hprofile/profiles/disk/ata.bash
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# disk/ata.bash
|
||||
#
|
||||
|
||||
echo /sys/devices/pci*/*/ata*/host*/target*/*/block/*(sd[a-z])
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
1
hprofile/profiles/disk/default
Normal file
1
hprofile/profiles/disk/default
Normal file
@@ -0,0 +1 @@
|
||||
adp
|
||||
22
hprofile/profiles/disk/post-start
Normal file
22
hprofile/profiles/disk/post-start
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# disk/post-start
|
||||
#
|
||||
|
||||
function _ata {
|
||||
source "$ata_bash"
|
||||
}
|
||||
|
||||
for dev in $(_ata); do
|
||||
echo cfq >$dev/queue/scheduler
|
||||
echo 0 >$dev/queue/iosched/slice_idle
|
||||
echo 64 >$dev/queue/iosched/quantum
|
||||
# more opitmizations with ncq
|
||||
echo 1024 >$dev/queue/nr_requests
|
||||
echo 2 >$dev/device/queue_depth
|
||||
done
|
||||
|
||||
unset _ata dev
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
4
hprofile/profiles/disk/profiles
Normal file
4
hprofile/profiles/disk/profiles
Normal file
@@ -0,0 +1,4 @@
|
||||
bat
|
||||
adp
|
||||
dyn
|
||||
quiet
|
||||
17
hprofile/profiles/disk/ptest
Normal file
17
hprofile/profiles/disk/ptest
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# disk/ptest
|
||||
#
|
||||
|
||||
local state="$(echo /sys/class/power_supply/A*)"
|
||||
|
||||
if test -n "$state" -a -r "$state"; then
|
||||
state=$(< "$state")
|
||||
case "$state" in
|
||||
(1) echo "adp";;
|
||||
(0) echo "bat";;
|
||||
esac
|
||||
fi
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
21
hprofile/profiles/disk/scripts/adp.start
Normal file
21
hprofile/profiles/disk/scripts/adp.start
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# disk/scripts/adp.start
|
||||
#
|
||||
|
||||
function _usb {
|
||||
source "$usb_bash"
|
||||
}
|
||||
_usb
|
||||
|
||||
function _ata {
|
||||
source "$ata_bash"
|
||||
}
|
||||
ata=$(_ata)
|
||||
|
||||
[[ "$ata" ]] && hdparm -q -S120 -B230 -M254 $ata
|
||||
|
||||
unset _ata _usb ata
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
21
hprofile/profiles/disk/scripts/bat.start
Normal file
21
hprofile/profiles/disk/scripts/bat.start
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# disk/scripts/bat.start
|
||||
#
|
||||
|
||||
function _usb {
|
||||
source "$usb_bash"
|
||||
}
|
||||
_usb
|
||||
|
||||
function _ata {
|
||||
source "$ata_bash"
|
||||
}
|
||||
ata=$(_ata)
|
||||
|
||||
[[ "$ata" ]] && hdparm -q -S120 -B210 -M230 $ata
|
||||
|
||||
unset _ata _usb ata
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
21
hprofile/profiles/disk/scripts/dyn.start
Normal file
21
hprofile/profiles/disk/scripts/dyn.start
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# disk/scripts/dyn.start
|
||||
#
|
||||
|
||||
function _usb {
|
||||
source "$usb_bash"
|
||||
}
|
||||
_usb
|
||||
|
||||
function _ata {
|
||||
source "$ata_bash"
|
||||
}
|
||||
ata=$(_ata)
|
||||
|
||||
[[ "$ata" ]] && hdparm -q -S180 -B254 -M254 $ata
|
||||
|
||||
unset _ata _usb ata
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
21
hprofile/profiles/disk/scripts/quiet.start
Normal file
21
hprofile/profiles/disk/scripts/quiet.start
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# disk/scripts/quiet.start
|
||||
#
|
||||
|
||||
function _usb {
|
||||
source "$usb_bash"
|
||||
}
|
||||
_usb
|
||||
|
||||
function _ata {
|
||||
source "$ata_bash"
|
||||
}
|
||||
ata=$(_ata)
|
||||
|
||||
[[ "$ata" ]] && hdparm -q -S120 -B200 -M200 $ata
|
||||
|
||||
unset _ata _usb ata
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
15
hprofile/profiles/disk/usb.bash
Normal file
15
hprofile/profiles/disk/usb.bash
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# disk/usb.bash
|
||||
#
|
||||
|
||||
for dev in /sys/devices/pci*/*/usb*/*/*/host*/target*/*/block/*(sd[a-z])
|
||||
do
|
||||
case "$(< $dev/removable)" in
|
||||
(1) echo noop >$dev/queue/scheduler;;
|
||||
(0) echo cfq >$dev/queue/scheduler;;
|
||||
esac
|
||||
done
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
Reference in New Issue
Block a user