diff --git a/extensions/preset-firstrun.sh b/extensions/preset-firstrun.sh new file mode 100644 index 000000000000..d191c48a539e --- /dev/null +++ b/extensions/preset-firstrun.sh @@ -0,0 +1,52 @@ +function post_family_tweaks__preset_configs() { + display_alert "$BOARD" "preset configs for rootfs" "info" + # Set FR_net_change_defaults to 1 to apply any network related settings below + echo "FR_net_change_defaults=1" > "${SDCARD}"/root/.not_logged_in_yet + + # Enable WiFi or Ethernet. + # NB: If both are enabled, WiFi will take priority and Ethernet will be disabled. + echo "FR_net_ethernet_enabled=1" >> "${SDCARD}"/root/.not_logged_in_yet + echo "FR_net_wifi_enabled=1" >> "${SDCARD}"/root/.not_logged_in_yet + + #Enter your WiFi creds + # SECURITY WARN: Your wifi keys will be stored in plaintext, no encryption. + echo "FR_net_wifi_ssid='MySSID'" >> "${SDCARD}"/root/.not_logged_in_yet + echo "FR_net_wifi_key='MyWiFiKEY'" >> "${SDCARD}"/root/.not_logged_in_yet + + # Country code to enable power ratings and channels for your country. eg: GB US DE | https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 + echo "FR_net_wifi_countrycode='GB'" >> "${SDCARD}"/root/.not_logged_in_yet + + #If you want to use a static ip, set it here + echo "FR_net_use_static=1" >> "${SDCARD}"/root/.not_logged_in_yet + echo "FR_net_static_ip='192.168.0.100'" >> "${SDCARD}"/root/.not_logged_in_yet + echo "FR_net_static_mask='255.255.255.0'" >> "${SDCARD}"/root/.not_logged_in_yet + echo "FR_net_static_gateway='192.168.0.1'" >> "${SDCARD}"/root/.not_logged_in_yet + echo "FR_net_static_dns='8.8.8.8 8.8.4.4'" >> "${SDCARD}"/root/.not_logged_in_yet + + # Preset user default shell, you can choose bash or zsh + echo "PRESET_USER_SHELL=bash" >> "${SDCARD}"/root/.not_logged_in_yet + + # Set PRESET_CONNECT_WIRELESS=y if you want to connect wifi manually at first login + echo "PRESET_CONNECT_WIRELESS=n" >> "${SDCARD}"/root/.not_logged_in_yet + + # Set SET_LANG_BASED_ON_LOCATION=n if you want to choose "Set user language based on your location?" with "n" at first login + echo "SET_LANG_BASED_ON_LOCATION=y" >> "${SDCARD}"/root/.not_logged_in_yet + + # Preset default locale + echo "PRESET_LOCALE=en_US.UTF-8" >> "${SDCARD}"/root/.not_logged_in_yet + + # Preset timezone + echo "PRESET_TIMEZONE=Etc/UTC" >> "${SDCARD}"/root/.not_logged_in_yet + + # Preset root password + echo "PRESET_ROOT_PASSWORD=RootPassword" >> "${SDCARD}"/root/.not_logged_in_yet + + # Preset username + echo "PRESET_USER_NAME=armbian" >> "${SDCARD}"/root/.not_logged_in_yet + + # Preset user password + echo "PRESET_USER_PASSWORD=UserPassword" >> "${SDCARD}"/root/.not_logged_in_yet + + # Preset user default realname + echo "PRESET_DEFAULT_REALNAME=Armbian" >> "${SDCARD}"/root/.not_logged_in_yet +}