mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
remove progress_wait
This commit is contained in:
parent
128d64f9d9
commit
dc2ab8fffd
1 changed files with 9 additions and 11 deletions
|
@ -33,22 +33,20 @@ _memory_error () {
|
|||
_switch_root_zram() {
|
||||
if [[ "${TTY}" = "tty1" ]]; then
|
||||
clear
|
||||
: > /.archboot
|
||||
_progress "1" "Creating btrfs on /dev/zram0..."
|
||||
[[ -d /sysroot ]] || mkdir /sysroot
|
||||
(modprobe -q zram
|
||||
modprobe -q zram
|
||||
modprobe -q zstd
|
||||
echo "1" >/sys/block/zram0/reset
|
||||
echo "zstd" >/sys/block/zram0/comp_algorithm
|
||||
echo "5G" >/sys/block/zram0/disksize
|
||||
mkfs.btrfs /dev/zram0 &>"${_NO_LOG}"
|
||||
mount -o discard /dev/zram0 /sysroot &>"${_NO_LOG}"
|
||||
rm /.archboot) &
|
||||
_progress_wait "1" "30" "Creating btrfs on /dev/zram0..." "0.1"
|
||||
: > /.archboot
|
||||
(tar -C / --exclude="./dev/*" --exclude="./proc/*" --exclude="./sys/*" \
|
||||
--exclude="./run/*" --exclude="./mnt/*" --exclude="./tmp/*" --exclude="./sysroot/*" \
|
||||
-clpf - . | tar -C /sysroot -xlspf - &>"${_NO_LOG}"; rm /.archboot) &
|
||||
_progress_wait "31" "99" "Copying archboot rootfs to /sysroot..." "0.125"
|
||||
_progress_wait "2" "99" "Copying archboot rootfs to /sysroot..." "0.125"
|
||||
# cleanup directories and files
|
||||
rm -r /sysroot/sysroot &>"${_NO_LOG}"
|
||||
rm /sysroot/init &>"${_NO_LOG}"
|
||||
|
|
Loading…
Reference in a new issue