Simple question: Is there anywhere I can dump a script file that will
cause it to get run on startup?
System is Debian (actually Raspbian although it could apply to other
Debian derivatives). On this occasion it has a GUI but I'm looking for
something that would work in a GUI-less environment.
Caveats: What I want to do is just copy a file there (eg dropping
files onto the SD card of a Pi). I'm trying to keep things simple so
ideally I don't want to edit any files, which means appending to
rc.local is out, for example.
I tried creating /etc/cron.d/mystuff with
@reboot root /root/mystuff.sh
.. which works fine on reboot but doesn't run from any other startup,
so not what I need.
I'm thinking about creating a script for /etc/rc.d and also creating
all the symlinks manually that would otherwise be created by
update-rc.d, but that's messy.
It seems odd that there isn't a /etc/rc.local.d directory (or similar)
which automatically runs all scripts present at the end of rc.local,
but unless I'm missing something there isn't any such approach.
(Background: I want a simple way to configure a Pi (or similar) by
writing the latest Raspbian image to a disk then extracting a tar file
of my changes over the top. I want to supplement existing files rather
than replace any that could obviously change between Raspbian
versions.)
--
Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
Registered in England (0456 0902) 21 Drakes Mews, Milton Keynes, MK8 0ER