Recent OpenVZ kernels provides a 'realbtime' entry in /proc/stat to track a HN boot time. Fix regex to match only 'btime' entry. --- prog/fiaif +++ prog/fiaif @@ -316,7 +316,7 @@ fi # Remove old state file if older than boot time if [[ -f ${SUBSYS_FILE} ]]; then - BOOT_TIME=$(grep btime /proc/stat|cut -f 2 -d" ") + BOOT_TIME=$(grep '^btime ' /proc/stat|cut -f 2 -d" ") SUBSYS_TIME=$(date +%s -r ${SUBSYS_FILE}) if (( SUBSYS_TIME < BOOT_TIME )); then rm -f ${SUBSYS_FILE}