diff --git a/sbin/e4rat_finalize.sh b/sbin/e4rat_finalize.sh index dd2fa5e..4baa51c 100755 --- a/sbin/e4rat_finalize.sh +++ b/sbin/e4rat_finalize.sh @@ -1,13 +1,16 @@ #!/bin/bash -let timeout=0`grep --color=NO '^[ \t]*timeout' /etc/e4rat.conf | head -n1 | sed 's~[^0-9]\+\([0-9]\+\).*~\1~'` - +let timeout=0`grep --color=NO '^[ \t]*timeout' /etc/e4rat.conf | head -n1 | awk '{print $2}'` [ 0 -eq $timeout ] && timeout=120 + +startup_log_file=`grep --color=NO '^[ \t]*\' /etc/e4rat.conf | awk '{print $2}'` +[[ "" == "$startup_log_file" ]] && startup_log_file=/var/lib/e4rat/startup.log + sleep $timeout e4rat-collect -k pkill e4rat-collect -e4rat-realloc /var/lib/e4rat/startup.log +e4rat-realloc $startup_log_file e4rat_switch.sh preload