So im working on a script which works gloriously.....when run in bash.
If i run the same script in rc.local it fails miserably, and doesnt do it's job.
What exactly is the difference between running in actual bash, and running through rc.local.
I've read up abit on it and it seems rc.local launches in sort of a mini version of bash/console
but is there a work around?
My biggest problem is it uses parted, which has next to none output, and sys logs shows nada, and if i run the script in tty/console, im forced to reinstall the whole OS, to replicate the error im trying to fix, which is a 30 mins of ZZZZzzzzz clonezilla action for each time i do it for some kind of output.
Chances are it uses sh rather than bash.
I'd put it in its own script, make sure you leave #!/bin/bash
as the first line, make it executable, and put exec /path/to/script.sh
in your rc.local.
1 Like