Is this default behavior?
I created a new tree for root and whenever I reboot I have to manually initialize it with 66-init -t.
How do I make a new tree initialize itself on boot? (No comment about this in 66 docs under 66-init)
yes this is the expected behaviour, if you want to start it automatically at boot time you need to mark it enabled: 66-tree -E <tree>
Hmm....*negative*
I usually create trees with -nE so they're enabled right away. Needless to say the tree has always been enabled since various reboots and will not initialize by itself.
               apache
----------------------------------
Initialized: no | Current: no
Contains:       | Enabled: yes
└─(0,Enabled,oneshot) httpd

Will boot like this always. After initializing manually with `66-init -t apache both` and `66-all -t apache up` services are launched like expected but the tree will reboot uninitialized on next boot.
I don't think this would be specific to my system? Should be easily reproducible.
@ Should be easily reproducible.
not the case and very strange, just tested and works
please give me the output of
# cat /var/lib/66/system/state
this file should contain all trees marked enabled
also give me the output of
# 66-info -S boot-extra
If some others user can test on their machine... could be a plus
Tried this with different trees and would always be the above described behavior.
root@ obarun / # cat /var/lib/66/system/state
root
lamp
stack
local
local
local
local
local
local
not
enabled
not
enabled
apache
root@ obarun / # 66-info -S boot-extra
            boot-extra        
on tree : boot
status : Enabled, nothing to display
type : oneshot
description : launch all tree enabled of root user when boot completed successfully
source : /etc/66/service/boot/
run at : /run/66/tree/0/boot/servicedirs/boot-extra
           dependencies       
├─(0,Enabled,bundle) 00
├─(0,Enabled,bundle) all-Rofs
└─(0,Enabled,bundle) all-Rwfs
             scripts          
start script :66-all -v${VERBOSITY} -l ${LIVE} up
stop script :66-all -v${VERBOSITY} -l ${LIVE} down
           environment        
!LIVE=/run/66
!VERBOSITY=0
Actually the output of `cat /var/lib/66/system/state` is a mess (root and apache being the only ones that really exist) and it has to do with me adding trees with spaces in their names. It's left overs of the names I used before of trees I have already disabled and removed from the system. Think that could provoke this?
maybe but this file should be handled when you do a 66-tree -D <tree> or a 66-tree -R <tree>. This file, if it doesn't exist yet, is created at the tree creation process.
Please try two things
First, try to disable a tree a see what happen on this file. Look if the corresponding tree doesn't exist anymore into the file after disabling the tree.
Second, remove the file and try to create a new tree. Note if you do that you need to enable again all your tree like e.g root tree.
Ok the file clearly messed up the init process by being clogged with non-existing entries.
I first created/enabled/disabled/enabled several trees to see that they get added at the bottom of this file as they should. So no error there.
Instead of deleting the whole file right away I first tested to see what happened if I just deleted the bad entries from the file.
Which turned out to remedy the situation.
I manually cleaned up to just keep one line
root
because that was the only tree enabled at the moment of the modification. After that I then again created two test trees and enabled them.
After a reboot they now got initialized as expected by the creator of 66 :D

So I'll leave this here for everybody (cause when searching threads in forums, we all just scroll down, don't we?)

CAUSE
You created trees with spaces in their names which misconfigured a system file.

SOLUTION
Manually edit and delete bad entries in /var/lib/66/system/state
Only leave tree names that actually exist and are currently enabled

PREVENTION
Do not create trees with spaces in their names. This is not a bug.
See here why it's technically not possible for Eric to change this behavior.

Powered by Obarun