Okay, that worked, i've created a start_screen() in ltsp-init-common, which can be called from the Gentoo initscript. Compared to the code in ltsp-core, I'm not iterating the 01-12 to actually start $SCREEN_DEFAULT, we know it's value already.
start_screen() {
if [ -z "${SCREEN_DEFAULT}" ]; then
for screen in 01 02 03 04 05 06 07 08 09 10 11 12; do eval num=\$SCREEN_$screen if [ -n "$num" ]; then SCREEN_DEFAULT=$screen fi done
fi
if [ -n "${SCREEN_DEFAULT}" ] && [ $(fgconsole) -ne ${SCREEN_DEFAULT} ]; then
chvt ${SCREEN_DEFAULT}
fi
Although it works, I'm not sure if I can commit it like this in ltsp-init-common, and remove to portion in ltsp-core (and add a start_screen() || true).
Okay, that worked, i've created a start_screen() in ltsp-init-common, which can be called from the Gentoo initscript. Compared to the code in ltsp-core, I'm not iterating the 01-12 to actually start $SCREEN_DEFAULT, we know it's value already.
start_screen() {
eval num=\$SCREEN_ $screen
if [ -n "$num" ]; then
SCREEN_ DEFAULT= $screen
fi
done
if [ -z "${SCREEN_DEFAULT}" ]; then
for screen in 01 02 03 04 05 06 07 08 09 10 11 12; do
fi
if [ -n "${SCREEN_DEFAULT}" ] && [ $(fgconsole) -ne ${SCREEN_DEFAULT} ]; then
chvt ${SCREEN_DEFAULT}
fi
}
Although it works, I'm not sure if I can commit it like this in ltsp-init-common, and remove to portion in ltsp-core (and add a start_screen() || true).