mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-09 04:51:27 +02:00
pentoo-system: update pentoo-zram to show which step is being slow
This commit is contained in:
parent
5765e86780
commit
dd93527788
2 changed files with 13 additions and 2 deletions
|
|
@ -14,9 +14,20 @@ start() {
|
|||
echo $(nproc) >/sys/devices/virtual/block/zram0/max_comp_streams || REVAL=$?
|
||||
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm || RETVAL=$?
|
||||
echo "${ZRAM_ABSOLUTE/\.??/}" > /sys/devices/virtual/block/zram0/disksize || RETVAL=$?
|
||||
eindent
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
ebegin "Formatting swap"
|
||||
else
|
||||
ebegin "Formatting swap (this is much faster if you boot uefi)"
|
||||
fi
|
||||
mkswap /dev/zram0 > /dev/null || RETVAL=$?
|
||||
swapon /dev/zram0 -p 10 > /dev/null || RETVAL=$?
|
||||
eend ${RETVAL}
|
||||
eend ${RETVAL}
|
||||
eoutdent
|
||||
if [ "${RETVAL}" = "0" ]; then
|
||||
ebegin "Activating ZRAM swap device"
|
||||
swapon /dev/zram0 -p 10 > /dev/null || RETVAL=$?
|
||||
eend ${RETVAL}
|
||||
fi
|
||||
}
|
||||
|
||||
# Swap gets torn down without help from this init script
|
||||
Loading…
Reference in a new issue