How do i execute Linux-Commands at startup on FP1?

Since IPv6 is more and more used in my everyday use of my fairphone, i want to enable the IPv6-Privacy-Extensions. This is done by executing the following commands in a terminal (you need a installed busybox for this):
busybox sysctl -w net.ipv6.conf.default.use_tempaddr=2
busybox sysctl -w net.ipv6.conf.all.use_tempaddr=2
(See this german article on the topic)

Unfortunately the activation of the privacy extensions isn’t persistent and lost after the next boot of the phone. So i’m looking for a way to execute these commands automatically at startup, but i can’t find a proper place to put these commands. Does anyone know where to put these to be executed automatically? Thank you!

Have you tried Google? :wink:

The first hit looks very promising.

Be sure, that i actually tried google and that i also found that page (which isn’t the 1st hit for everyone). Unfortunately the fairphone does not have a /etc/init.d-Directory. That is the reason i asked: All the usual ways don’t work, directories or files do not exist, also the well known App ‘Boot Shell’. The init-sequence is somehow different…

If you want to tweak sysctl settings, why not write them to sysctl.conf directly instead of looking to call a shell?

There’s one simple reason why i don’t do that: Fairphone OS does not have ‘sysctl.conf’’. It doesn’t even have a builtin sysctl. You need busybox installed to tweak parameters like this, hence the ‘busybox’-prefix in the commands i want to execute.

I understand the reasons for wanting to set it permanently and manually (if someone figures it out I’d like to know too!), and I haven’t tested the below myself, but is the app IPv6Config on f-droid an option to work around the problem in the meantime?

From the developer’s website:

This android application can be set to start at device bootup and automatically set the appropriate Linux kernel configuration option on all known network interfaces (WiFi and GPRS/UMTS, mostly) so that they will use randomly generated addresses instead of those derived from the device MAC address.

Thanks for the tipp. I’ve tried it, but unfortunately the app stops shortly after starting with a simple ‘IPv6Config has stopped’ (on both fairphone and nexus7). I also tried to build and flash my own boot.img, where i put the commands into the init.rc-file, but that didn’t help either. I’m about to believe that the kernel hasn’t been built with the privacy-extensions, which puts an end to my efforts. Thanks to everyone who tried to help.

IMO, you should try to write to customer support and ask them to forward the question to one of the developers. They should be able to answer this, since they probably got access to more information on the kernel.