File tree Expand file tree Collapse file tree
src/modules/admin-toolkit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,3 +158,22 @@ then
158158 unpack /filesystem/tools/scripts /home/" ${ADMIN_TOOLKIT_USER_SCRIPTS_NAME} " /scripts ${ADMIN_TOOLKIT_USER_SCRIPTS_NAME}
159159 chmod +x ` find /home/" ${ADMIN_TOOLKIT_USER_SCRIPTS_NAME} " /scripts -type f`
160160fi
161+
162+ # Screen Rotation
163+ if [ " $ADMIN_TOOLKIT_SCREEN_ROTATION " != " normal" ]
164+ then
165+ # Handle rotation if the gui module closes after this module
166+ echo " Adding screen rotation..."
167+ if grep -q " GUI_SESSION_PLACEHOLDEFR" /home/pi/scripts/start_gui ; then
168+ sed -i /home/pi/scripts/start_gui -e " s/^GUI_SESSION_PLACEHOLDEFR/export DISPLAY=:0/"
169+ echo " /home/pi/scripts/rotate.sh $ADMIN_TOOLKIT_SCREEN_ROTATION " >> /home/pi/scripts/start_gui
170+ echo ' GUI_SESSION_PLACEHOLDEFR' >> /home/pi/scripts/start_gui
171+ elif grep -q " /home/pi/scripts/run_onepageos" /home/pi/scripts/start_gui ; then
172+ sed -i /home/pi/scripts/start_gui -e " s/^\/home\/pi\/scripts\/run_onepageos/export DISPLAY=:0/"
173+ echo " /home/pi/scripts/rotate.sh $ADMIN_TOOLKIT_SCREEN_ROTATION " >> /home/pi/scripts/start_gui
174+ echo ' /home/pi/scripts/run_onepageos' >> /home/pi/scripts/start_gui
175+ else
176+ echo " Couldn't add screen rotation... are you building with the gui module?"
177+ fi
178+
179+ fi
You can’t perform that action at this time.
0 commit comments