RSS Bot Posted January 23 Share Posted January 23 Description Add preset variables so that image can do first login automaticly without user interaction. I store variables like username/password in /root/.not_logged_in_yet so that it will get deleted after firstlogin. We can add set these variables by extension post_family_tweaks in board config: function post_family_tweaks__firstlogin_preset_configs() { display_alert "$BOARD" "preset configs for firstlogin" "info" echo "PRESET_USER_SHELL=bash" > "${SDCARD}"/root/.not_logged_in_yet echo "SET_LANG_BASED_ON_LOCATION=y" >> "${SDCARD}"/root/.not_logged_in_yet echo "PRESET_LOCALE=zh_CN.UTF-8" >> "${SDCARD}"/root/.not_logged_in_yet echo "PRESET_TIMEZONE=Asia/Shanghai" >> "${SDCARD}"/root/.not_logged_in_yet echo "PRESET_ROOT_PASSWORD=Armbian" >> "${SDCARD}"/root/.not_logged_in_yet echo "PRESET_USER_NAME=jfliu" >> "${SDCARD}"/root/.not_logged_in_yet echo "PRESET_USER_PASSWORD=Armbian" >> "${SDCARD}"/root/.not_logged_in_yet echo "PRESET_DEFAULT_REALNAME=Jfliu" >> "${SDCARD}"/root/.not_logged_in_yet } How Has This Been Tested? Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration. [x] Build command ./compile.sh BOARD=fl700n BRANCH=edge DEB_COMPRESS=xz KERNEL_GIT=shallow BUILD_DESKTOP=yes BUILD_MINIMAL=no KERNEL_CONFIGURE=no RELEASE=bookworm DESKTOP_ENVIRONMENT=xfce DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base DESKTOP_APPGROUPS_SELECTED='' [x] Boot image with or without ethernet network, board boots into xfce desktop environment without user interaction [ ] Haven't tested on board with wireless. I haven't implement automatic Connect via wireless? [Y/n]. I will do it later. Checklist: [x] My code follows the style guidelines of this project [x] I have performed a self-review of my own code [ ] I have commented my code, particularly in hard-to-understand areas [ ] I have made corresponding changes to the documentation [x] My changes generate no new warnings [ ] Any dependent changes have been merged and published in downstream modules View the full article Link to comment Share on other sites More sharing options...
Recommended Posts