To start an application or shell-script at boot, what would be a recommended way for Obarun?
So far I'm looking it up at ArchWiki - Autostart and Start .sh file at login

Since some of these explanations refer to SystemD, we might want to add one specific for the Obarun Wiki.
Maybe you can explain what do you want to accomplish...
I want these four statements to get executed at boot. May want to add more.

cpupower frequency-set -g powersave
urxvtd --quiet --opendisplay --fork
xrdb -merge ~/.Xresources
mons -e left (<- this is an AUR application for configuring the display of two monitors)

In former Obarun installations, I had these successfully at .xinitrc.
Though putting them in /home/[username]/.config/jwm/start does work! But I was wondering if there exists a WM-independent solution?
What desktop environment do you have? In Openbox, for ex., there is the file ~/.config/openbox/autostart, and applications or shell-scripts can be run like this:
tint2 -c ~/.config/tint2/tint2rc & 
compton --config ~/.config/compton.conf & 
conky -c ~/.config/conky/conky.conf &
using xinitrc and jwm start files is a good way, but you can use oneshot service too. The place of the created service will depend of the permissions needed for the execution. I will show you the general way to make a oneshot service and how to use it for normal user or root user.

Note : in general way, the name of the service should be created with prefix to avoid conflicts with service installed by pacman. For example, creating a cups service named cups will cause conflicts with the package cups-s6serv. When you create a custom service, create it with a prefix or a no official name like amelie-cups.

Note two : the folder place where create a root service is /etc/s6-serv/available/classic for classic daemon and /etc/s6-serv/available/rc for rc daemon. For user service the folders are /etc/s6-serv/available/user/classic /etc/s6-serv/available/user/rc for classic and rc service respectively.

CPUPOWER : i never used it , but i think this program need root permissions. So, let create a oneshot root permissions service.
create a folder with the service name
# mkdir -p /etc/s6-serv/available/rc/amelie-cpupower
on it create a file up, type with 644 as permissions
# cd /etc/s6-serv/available/rc/amelie-cpupower
# touch up
# touch type
# chmod 644 up
# chmod 644 type
edit the file up and write within the word oneshot. This will declare the service as oneshot service
edit the file up like this
# !/bin/bash
cpupower frequency-set -g powersave
Now you service is ready to use, to enable it for every boot, use s6opts command as root. First, check your current database, If your current database is default, you need to create a new one because linking a new daemon on this database is not alowed.
# s6opts which_db current 
this command will return the name of the current database e.g Live
# s6opts update amelie-cpupower
the service should start and declared on the database,so it will be started at every boot.
You can do the same for all your command except that you need to use s6opts with root or user permissions depending of what you need.
This is allow you to apply whatever the command you need on your boot or on your X session when it started because the user supervision tree it's only started when you log on X server.
Remember , we talk about here about oneshot service, not longrun service like daemon.
I find this discussion interesting, I use openbox and I play around with ~/.config/openbox/autostart a lot.

I think there are 3 levels to autostarting stuff.
1 Stuff you need to start as soon as the system boots up, which I think eric has covered.
2 Things that you need to start as soon as X goes up, no matter who is going to log in
3 Things that will start specific to the user and the desktop that is starting up. If you use something like lxde or lxqt things that would start on openbox would be redundant to start in a full desktop (menus, panels, background, etc.)

One of the things that I have starting up soon is a copy of my complicated list of dns servers, which for various reasons late systems have been replacing with defaults every time the network goes up. To make sure I don't use those of the ISP (agency reviewable and monitored) I replace with my own trust-worthy ones. --> opennic
fungalnet, it would be interesting to know your view of opennic (installed for myself also). Are you sure your ISP can not monitor your traffic?
@ fungalnet
how do you start your opennic daemon?
I just copy my resolv.conf.list to resolv.conf everytime the system starts
why you do to not use the daemon? maybe you can check pdnsd too?
9 months later
[SOVLED]

Man I feel so stupid for asking this,...even more because I already managed to accomplish this once in the past...
I want to automatically import a ZFS pool from a seperate disk on boot.
My initramfs modules include zfs so without magic and once booted into the system the only thing I have to do to accomplish this manually is the following line:
$ sudo zpool import [i]poolname[/i]
I remember when I did my first obarun install I got this to work following your above post on how to create a oneshot service. But I don't remember how...>_>""
I tried to follow your instructions and wrote this into my /etc/s6-serv/available/rc/zfs-oneshot/up file:
# !/bin/bash
zpool import && zpool import datengrab
Reason being for the two commands is that root needs to import without explicit name first.
After this I did '# s6opts update zfs-oneshot' but the service errored out with exit code 1
After this I ran into a nightmare of database errors and backup switches where I ended up being on database Live.backup.backup.backup.backup.
I had to manually search in '/etc/s6-serv/enabled/rc/source' for the service in every database and delete it from there with 's6opts delete database zfs-oneshot'.
I can not reconstruct the bunch of error messages and the processes I had to go through because it was really tough to get around this and back on database Live.
This is a one liner,...can it be this hard? T_T

[SOLUTION]

Although the error wasn't very verbose when trying to update the service I got it sorted out by just repassing my zfs bascis a bit...
My root user did not yet have a cache file entry for this pool so the command would throw an error and could not import anything.
I got this sorted by logging in as root and doing the following commands:
# zpool import
# zpool import datengrab
# zpool set cachefile=/etc/zfs/zpool.cache datengrab
# zpool export datengrab
# s6opts update zfs-oneshot
This then successfully imported the pool right away and does so on every boot. I also created a file /etc/s6-serv/available/rc/zfs-oneshot/down which exports the pool.
I had done this before with sudo on my user account but it appears to not be sufficient to have root import the pool.
2 years later
Sorry to bump this old thread, but I don't have /etc/s6-serv, so I can't take advantage of what was posted.

Was /etc/s6-serv changed to some other directory during the last few years?

Regardless, I want to autostart a service at boot that directs the contents of /run/66/log/0/current into text files in /etc/bootlogs*, so I can have a nice dated collection of logs that I can check carefully.
For reference, this is the script I'm considering:
# !/bin/sh
cat /run/66/log/0/current > /etc/bootlogs/"$(date)".txt
* Just an FYI, I created this directory
I think /etc/66/rc.local can do the same thing, just remember to make sure rc.local is executable (# chmod +x /etc/66/rc.local ) and the first line is a shebang like # !/bin/sh

Also in your /etc/66/boot.conf you have to go down to rc.local and say yes for enabling it.
So I followed your instructions and now it won't boot. I thought I could just chroot into my drive from the live installer to change it back to how it was, but the root directory isn't the same as my real one and changes don't remain past reboots. The other partitions are the same though (not sure if changes stick however), just not root; / .

EDIT: I think it might be best to make a thread dedicated to my current issue
From live identify the root partition of your Obarun root .... as an example let's say it is /dev/sda7
# indicates root not user
# mount /dev/sda7 /mnt
# nano /mnt/etc/66/boot.conf
switch yes to no again for rc.local, Cttl-X Y
reboot
That worked, thanks. Though, I thought chrooting was meant to effectively make you a root user on another system?
Yes it does, and using arch-chroot works well because it mounts many necessary resources from host to guest,
# arch-chroot /mnt zsh  
Or you can leave it blank for default or specify the shell you want to run on.
But in this case all you need is make a small change to a file, no need to chroot.
Use the df command at any instance to see what is mounted in your system.

Powered by Obarun