Custom startup_log_file

This commit is contained in:
Kolan Sh 2012-08-31 14:43:17 +04:00
parent 8821e20a84
commit 1703d801d9
1 changed files with 6 additions and 3 deletions

View File

@ -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]*\<startup_log_file\>' /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