mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-02-09 08:52:31 +01:00
pentoo-system: add a timeout to mkswap, it is failing randomly and I have no clue why
This commit is contained in:
parent
e33c6687dd
commit
bd0562757d
2 changed files with 12 additions and 3 deletions
|
|
@ -16,8 +16,17 @@ start() {
|
|||
echo "${ZRAM_ABSOLUTE/\.??/}" > /sys/devices/virtual/block/zram0/disksize || RETVAL=$?
|
||||
eindent
|
||||
ebegin "Formatting swap"
|
||||
mkswap /dev/zram0 > /dev/null || RETVAL=$?
|
||||
eend ${RETVAL}
|
||||
timeout -k 31 30 mkswap /dev/zram0 > /dev/null || RETVAL=$?
|
||||
if [ "${RETVAL}" = "124" ]; then
|
||||
cmdline="$(cat /proc/cmdline)"
|
||||
if [ "${cmdline#*cdroot}" != "${cmdline}" ]; then
|
||||
eend 124 "mkswap timed out, if you see this a lot \"rc-service del pentoo-zram\""
|
||||
else
|
||||
eend ${RETVAL} "mkswap timed out, no ZRAM available"
|
||||
fi
|
||||
else
|
||||
eend ${RETVAL}
|
||||
fi
|
||||
eoutdent
|
||||
if [ "${RETVAL}" = "0" ]; then
|
||||
ebegin "Activating ZRAM swap device"
|
||||
|
|
@ -189,7 +189,7 @@ src_install() {
|
|||
|
||||
newinitd "${FILESDIR}"/pentoo-linux-symlinks.initd pentoo-linux-symlinks
|
||||
newinitd "${FILESDIR}"/pentoo-powersave.initd pentoo-powersave
|
||||
newinitd "${FILESDIR}"/pentoo-zram.initd-r2 pentoo-zram
|
||||
newinitd "${FILESDIR}"/pentoo-zram.initd-r3 pentoo-zram
|
||||
newconfd "${FILESDIR}"/pentoo-zram.confd pentoo-zram
|
||||
|
||||
dosym /var/lib/layman/pentoo/scripts/pentoo-updater.sh /usr/sbin/pentoo-updater
|
||||
Loading…
Reference in a new issue