I would like to run a script (or cli command) during first system boot - prior to quicksetup running.
How/where can I run this script/command?
Does it need to be somewhere in the initrd.gz?
Moderator: Forum moderators
I would like to run a script (or cli command) during first system boot - prior to quicksetup running.
How/where can I run this script/command?
Does it need to be somewhere in the initrd.gz?
@greengeek :-
Hi, Ian.
I could be wrong - probably am! - but I believe you can do this from /etc/init.d? I think things from here startup before most other things do.
Doubtless others will know better than I..!
Mike.
Depends on your command.
A lot a things happen before /usr/sbin/quicksetup is started from /usr/sbin/delayedrun
, so if you run your command too early in the boot sequence then whatever you are trying to set might be overriden by later commands. If your only condition is to run the command "prior to quicksetup running", why not simply put it at the beginning of /usr/sbin/quicksetup itself ? This also ensures that - like quicksetup - your code runs only once per session.
What is your script doing?
You want it to actually do something, the very first boot of a Puppy version?
Before anything has been setup, for how the Puppy version is going to run?
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
Yes - as an example I want to run a command that turns off tap-to-click. I currently have this script in /root/Startup but that does not help me during first boot. (Because /root/Startup scripts only run after the X-restart that occurs after quicksetup runs)
Another example is "Speaker volume".
Puppy defaults to about 2/3 of maximum speaker volume and I want to make sure I have full volume without user intervention.
MochiMoppel wrote: ↑Sat Aug 27, 2022 1:05 pmIf your only condition is to run the command "prior to quicksetup running", why not simply put it at the beginning of /usr/sbin/quicksetup itself ? This also ensures that - like quicksetup - your code runs only once per session.
Great idea, thanks. Will try this.
Ok, thanks. Looks very similar to /root/Startup. Will give that a try.
Cheers!