On first run REVIOUSSTATUS doesn't exist, so it cannot be UP or DOWN, invert the logic to fix this. While I'm here, check if file exists before cat it
Save status even if no script is executed
test only does integer comparison, use bc to compare float
When WANTIME is empty, there is nothing to do here
Make sure functions called by rc.start_packages can see $g['booting'] when we are booting