Required using `sed` instead of `grep` due to BusyBox `grep` not supporting PCRE. Also required rewriting the conditions for the if statements, as `ash` does not support Bash's Conditional Expressions.