My goal is to use a script that will install an executable file on Linux (Busybox variant). The target file should run when the computer starts, so in the rc.sysinit file, I'll have a line like the following:
/usr/bin/foo &
Now, when I run the install script, that line may or may not already be present (depending if the file had been installed previously). And it could be anywhere in the file. So how can I write the script so that line will be added to rc.sysinit only if it is not already there?