mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
Compare commits
11 commits
505d93ab85
...
6598f9f64a
Author | SHA1 | Date | |
---|---|---|---|
|
6598f9f64a | ||
|
b7f5791224 | ||
|
8e0828270a | ||
|
d27c4c11c6 | ||
|
867052e43c | ||
|
5ee4d7a11c | ||
|
d117667426 | ||
|
f4ef8f11cf | ||
|
7bfe566522 | ||
|
380d13c25a | ||
|
3cf9448cbb |
8 changed files with 24 additions and 24 deletions
|
@ -40,7 +40,7 @@ _timezone () {
|
|||
while [[ -z "${_CONTINUE}" ]]; do
|
||||
_REGIONS="America - Europe - Africa - Asia - Australia -"
|
||||
#shellcheck disable=SC2086
|
||||
if _dialog --title " Region Menu " --menu "" 11 30 6 ${_REGIONS} 2>${_ANSWER}; then
|
||||
if _dialog --cancel-label "Exit" --title " Timezone Region " --menu "" 11 30 6 ${_REGIONS} 2>${_ANSWER}; then
|
||||
_REGION=$(cat ${_ANSWER})
|
||||
_ZONES=""
|
||||
_CONTINUE=1
|
||||
|
@ -53,7 +53,7 @@ _timezone () {
|
|||
_ZONES="${_ZONES} ${i} -"
|
||||
done
|
||||
#shellcheck disable=SC2086
|
||||
if _dialog --title " Timezone Menu " --menu "" 21 30 16 ${_ZONES} 2>${_ANSWER}; then
|
||||
if _dialog --cancel-label "Back" --title " Timezone " --menu "" 21 30 16 ${_ZONES} 2>${_ANSWER}; then
|
||||
_SET_ZONE="1"
|
||||
_ZONE=$(cat ${_ANSWER})
|
||||
[[ "${_ZONE}" == "${_REGION}" ]] || _ZONE="${_REGION}/${_ZONE}"
|
||||
|
@ -87,16 +87,16 @@ _timeset() {
|
|||
if [[ -z "${_SET_TIME}" ]]; then
|
||||
timedatectl set-ntp 0
|
||||
# display and ask to set date/time
|
||||
_dialog --title ' Date Setting' --no-cancel --calendar "Use <TAB> to navigate and arrow keys to change values." 0 0 0 0 0 2> ${_ANSWER}
|
||||
_dialog --title " Date " --no-cancel --calendar "Use <TAB> to navigate and arrow keys to change values." 0 0 0 0 0 2> ${_ANSWER}
|
||||
_DATE="$(cat ${_ANSWER})"
|
||||
_dialog --title ' Time Setting ' --no-cancel --timebox "Use <TAB> to navigate and up/down to change values." 0 0 2> ${_ANSWER}
|
||||
_dialog --title " Time " --no-cancel --timebox "Use <TAB> to navigate and up/down to change values." 0 0 2> ${_ANSWER}
|
||||
_TIME="$(cat ${_ANSWER})"
|
||||
# save the time
|
||||
# DD/MM/YYYY hh:mm:ss -> YYYY-MM-DD hh:mm:ss
|
||||
_DATETIME="$(echo "${_DATE}" "${_TIME}" | sed 's#\(..\)/\(..\)/\(....\) \(..\):\(..\):\(..\)#\3-\2-\1 \4:\5:\6#g')"
|
||||
timedatectl set-time "${_DATETIME}"
|
||||
fi
|
||||
if _dialog --cr-wrap --title " Confirmation Dialog " --yesno "$(${_DATE_PROGRAM})" 0 0; then
|
||||
if _dialog --cr-wrap --title " Summary " --yesno "$(${_DATE_PROGRAM})" 0 0; then
|
||||
_dialog --infobox "Clock configuration completed successfully." 3 50
|
||||
_SET_TIME="1"
|
||||
sleep 3
|
||||
|
|
|
@ -89,7 +89,7 @@ _manage() {
|
|||
|
||||
_exit() {
|
||||
#shellcheck disable=SC2086
|
||||
_dialog --title " EXIT MENU " --menu "" 9 30 5 \
|
||||
_dialog --title " Exit Menu " --menu "" 9 30 5 \
|
||||
"1" "Exit Program" \
|
||||
"2" "Reboot System" \
|
||||
"3" "Poweroff System" 2>${_ANSWER} || return 1
|
||||
|
@ -121,7 +121,7 @@ _launcher() {
|
|||
_dialog --title " Main Menu " --menu "" 10 40 6 \
|
||||
"1" "Launch Archboot Setup" \
|
||||
"${_MENU[@]}" \
|
||||
"4" "Exit Program" 2>${_ANSWER}
|
||||
"4" "Exit" 2>${_ANSWER}
|
||||
case $(cat ${_ANSWER}) in
|
||||
"1")
|
||||
[[ -e /tmp/.launcher-running ]] && rm /tmp/.launcher-running
|
||||
|
|
|
@ -28,11 +28,11 @@ _localize_menu() {
|
|||
_OTHER_LOCALES="be_BY Belarusian bg_BG Bulgarian cs_CZ Czech da_DK Dansk fi_FI Finnish el_GR Greek hu_HU Hungarian it_IT Italian lt_LT Lithuanian lv_LV Latvian mk_MK Macedonian nl_NL Dutch nn_NO Norwegian pl_PL Polish ro_RO Romanian ru_RU Russian sk_SK Slovak sr_RS Serbian sv_SE Swedish uk_UA Ukrainian"
|
||||
_CANCEL=""
|
||||
#shellcheck disable=SC2086
|
||||
_dialog --title " Locale Menu " --menu "" 12 35 5 ${_LOCALES} 2>${_ANSWER} || _abort
|
||||
_dialog --cancel-label "Exit" --title " Locale Menu " --menu "" 12 35 5 ${_LOCALES} 2>${_ANSWER} || _abort
|
||||
_LOCALE=$(cat ${_ANSWER})
|
||||
if [[ "${_LOCALE}" == "OTHER" ]]; then
|
||||
#shellcheck disable=SC2086
|
||||
if _dialog --title " Other Locale Menu " --menu "" 17 35 11 ${_OTHER_LOCALES} 2>${_ANSWER}; then
|
||||
if _dialog --cancel-label "Back" --title " Other Locale Menu " --menu "" 17 35 11 ${_OTHER_LOCALES} 2>${_ANSWER}; then
|
||||
_LOCALE=$(cat ${_ANSWER})
|
||||
else
|
||||
_LOCALE=""
|
||||
|
|
|
@ -105,11 +105,11 @@ _wireless() {
|
|||
sleep 3
|
||||
_printk on
|
||||
if [[ -n "${_WLAN_AUTH}" ]]; then
|
||||
_dialog --infobox "Authentification was successful." 3 70
|
||||
_dialog --infobox "Authentification to SSID='${_WLAN_SSID}' was successful." 3 70
|
||||
sleep 3
|
||||
return 0
|
||||
else
|
||||
_dialog --title " ERROR " --infobox "Authentification failed. Please configure again!" 3 70
|
||||
_dialog --title " ERROR " --infobox "Authentification to SSID='${_WLAN_SSID}' failed. Please configure again!" 3 70
|
||||
sleep 5
|
||||
return 1
|
||||
fi
|
||||
|
@ -169,7 +169,7 @@ _network() {
|
|||
_dialog --no-cancel --title " Proxy Server " --inputbox "\nhttp://name:port\nhttp://ip:port\nhttp://username:password@ip:port\n\n Leave the field empty if no proxy is needed to install." 12 65 "" 2>"${_ANSWER}"
|
||||
_PROXY=$(cat "${_ANSWER}")
|
||||
_PROXIES="http_proxy https_proxy ftp_proxy rsync_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY"
|
||||
_dialog --title " Confirmation Dialog " --yesno "Interface: ${_INTERFACE}\nConnection: ${_CONNECTION}\nNetwork profile: ${_NETWORK_PROFILE}\nSSID: ${_WLAN_SSID}\nHidden: ${_WLAN_HIDDEN}\nKey: ${_WLAN_KEY}\ndhcp or static: ${_IP}\nIP address: ${_IPADDR}\nGateway: ${_GW}\nDNS server: ${_DNS}\nProxy setting: ${_PROXY}" 0 0 && _NETPARAMETERS=1
|
||||
_dialog --title " Summary " --yesno "Interface: ${_INTERFACE}\nConnection: ${_CONNECTION}\nNetwork profile: ${_NETWORK_PROFILE}\nSSID: ${_WLAN_SSID}\nHidden: ${_WLAN_HIDDEN}\nKey: ${_WLAN_KEY}\ndhcp or static: ${_IP}\nIP address: ${_IPADDR}\nGateway: ${_GW}\nDNS server: ${_DNS}\nProxy setting: ${_PROXY}" 0 0 && _NETPARAMETERS=1
|
||||
done
|
||||
# write systemd-networkd profile
|
||||
echo "#$_NETWORK_PROFILE generated by archboot setup" > "${_NETWORK_PROFILE}"
|
||||
|
@ -206,17 +206,17 @@ _network() {
|
|||
echo "Using setup's network profile ${_NETWORK_PROFILE} now..." >"${_LOG}"
|
||||
systemctl restart systemd-networkd
|
||||
systemctl restart systemd-resolved
|
||||
_dialog --infobox "Waiting for network link to come up..." 3 70
|
||||
_dialog --infobox "Waiting for network link to come up..." 3 50
|
||||
# add sleep here for systemd-resolve get correct values
|
||||
sleep 5
|
||||
if ! getent hosts www.google.com &>"${_LOG}"; then
|
||||
_dialog --title " ERROR " --infobox "Your network is not working correctly, please configure again!" 3 70
|
||||
_dialog --title " ERROR " --infobox "Your network is not working correctly, please configure again!" 3 60
|
||||
sleep 5
|
||||
return 1
|
||||
fi
|
||||
_dialog --infobox "Link is up. Network is ready." 3 60
|
||||
_dialog --infobox "Link is up. Network is ready." 3 50
|
||||
sleep 3
|
||||
_dialog --infobox "Network configuration completed successfully." 3 70
|
||||
_dialog --infobox "Network configuration completed successfully." 3 50
|
||||
sleep 3
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ _vconsole_font() {
|
|||
_FONTS="ter-v16n Worldwide latarcyrheb-sun16 Worldwide eurlatgr Europe"
|
||||
fi
|
||||
#shellcheck disable=SC2086
|
||||
if _dialog --title " Vconsole Font " --menu "" 9 40 3 ${_FONTS} 2>${_ANSWER}; then
|
||||
if _dialog --cancel-label "Exit" --title " Vconsole Font " --menu "" 9 40 3 ${_FONTS} 2>${_ANSWER}; then
|
||||
#shellcheck disable=SC2086
|
||||
_FONT=$(cat ${_ANSWER})
|
||||
_CONTINUE=1
|
||||
|
@ -63,13 +63,13 @@ _vconsole_keymap() {
|
|||
_KEYMAPS="us English de German es Spanish fr French pt Portuguese OTHER More"
|
||||
_OTHER_KEYMAPS="be Belarusian bg Bulgarian br Brazil ca Canada cz Czech dk Dansk et Estonian fi Finnish gr Greek hu Hungarian it Italian lt Lithuanian lv Latvian mk Macedonian nl Dutch no Norwegian pl Polish ro Romanian ru Russian sk Slovak sr Serbian sv Swedish uk Ukrainian"
|
||||
#shellcheck disable=SC2086
|
||||
if _dialog --title " Keymap Region " --menu "" 12 40 6 ${_KEYMAPS} 2>${_ANSWER}; then
|
||||
if _dialog --no-cancel --title " Keymap Region " --menu "" 12 40 6 ${_KEYMAPS} 2>${_ANSWER}; then
|
||||
_KEYMAP=$(cat ${_ANSWER})
|
||||
_CONTINUE="1"
|
||||
if [[ "${_KEYMAP}" == "OTHER" ]]; then
|
||||
_CONTINUE=""
|
||||
#shellcheck disable=SC2086
|
||||
if _dialog --title " Keymap Region " --menu "" 17 40 11 ${_OTHER_KEYMAPS} 2>${_ANSWER}; then
|
||||
if _dialog --cancel-label "Back" --title " Keymap Region " --menu "" 17 40 11 ${_OTHER_KEYMAPS} 2>${_ANSWER}; then
|
||||
_KEYMAP=$(cat ${_ANSWER})
|
||||
_CONTINUE=1
|
||||
fi
|
||||
|
@ -83,7 +83,7 @@ _vconsole_keymap() {
|
|||
_KEYMAPS="${_KEYMAPS} ${i} -"
|
||||
done
|
||||
#shellcheck disable=SC2086
|
||||
if _dialog --title " Keymap Layout " --menu "" 13 40 7 ${_KEYMAPS} 2>${_ANSWER}; then
|
||||
if _dialog --cancel-label "Back" --title " Keymap Layout " --menu "" 13 40 7 ${_KEYMAPS} 2>${_ANSWER}; then
|
||||
#shellcheck disable=SC2086
|
||||
_KEYMAP=$(cat ${_ANSWER})
|
||||
_CONTINUE=1
|
||||
|
|
|
@ -310,7 +310,7 @@ _mainmenu() {
|
|||
"5" "Install Packages" \
|
||||
"6" "Configure System" \
|
||||
"7" "Install Bootloader" \
|
||||
"8" "Exit Program" 2>${_ANSWER}
|
||||
"8" "Exit" 2>${_ANSWER}
|
||||
_NEXTITEM="$(cat ${_ANSWER})"
|
||||
case $(cat ${_ANSWER}) in
|
||||
"0")
|
||||
|
@ -350,7 +350,7 @@ _mainmenu() {
|
|||
_install_bootloader ;;
|
||||
"8")
|
||||
#shellcheck disable=SC2086
|
||||
_dialog --title " EXIT MENU " --menu "" 9 30 5 \
|
||||
_dialog --title " Exit Menu " --menu "" 9 30 5 \
|
||||
"1" "Exit Program" \
|
||||
"2" "Reboot System" \
|
||||
"3" "Poweroff System" 2>${_ANSWER}
|
||||
|
|
|
@ -93,7 +93,7 @@ _download_latest() {
|
|||
# Download latest setup and quickinst script from git repository
|
||||
if [[ -n "${_D_SCRIPTS}" ]]; then
|
||||
_network_check
|
||||
echo -e "\e[1mStart:\e[m Downloading latest vconsole, clock, quickinst, setup and helpers..."
|
||||
echo -e "\e[1mStart:\e[m Downloading latest archboot from GIT master tree..."
|
||||
[[ -d "${_INST}" ]] || mkdir "${_INST}"
|
||||
# config
|
||||
echo -e "\e[1mStep 1/4:\e[m Downloading latest config..."
|
||||
|
|
|
@ -33,7 +33,7 @@ if echo "${HOOKS[@]}" | grep -qw archboot_net; then
|
|||
fi
|
||||
if echo "${HOOKS[@]}" | grep -qw archboot_installer; then
|
||||
echo -e "\e[1mManage Archboot Environment:\e[m" >> "${MOTD}"
|
||||
echo -e " - Use the \e[1;92m'update'\e[m or \e[1;92m'launcher'\e[m script." >> "${MOTD}"
|
||||
echo -e " - Use the \e[1;92m'launcher'\e[m or \e[1;92m'update'\e[m script." >> "${MOTD}"
|
||||
#shellcheck disable=SC2129
|
||||
echo -e "\e[1mInstallation Or Installation For Experts:\e[m" >> "${MOTD}"
|
||||
echo -e " - Use the \e[1;92m'setup'\e[m or \e[1;92m'quickinst'\e[m script." >> "${MOTD}"
|
||||
|
|
Loading…
Reference in a new issue