mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
add switch of logo
This commit is contained in:
parent
e7bc07e433
commit
74a1340abb
@ -27,7 +27,10 @@ TITLE="BOOTING:"
|
||||
[ "${BUS}" = "usb" ] && TITLE+=" [${BUS^^} flashdisk]" || TITLE+=" [${BUS^^} DoM]"
|
||||
printf "\033[1;33m%*s\033[0m\n" $(((${#TITLE} + ${COLUMNS}) / 2)) "${TITLE}"
|
||||
|
||||
[ -c "/dev/fb0" -a -f "${CACHE_PATH}/logo.png" ] && echo | fbv -acuf "${CACHE_PATH}/logo.png" >/dev/null
|
||||
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
||||
if [ ${DSMLOGO} = "true" -a -c "/dev/fb0" -a -f "${CACHE_PATH}/logo.png" ]; then
|
||||
echo | fbv -acuf "${CACHE_PATH}/logo.png" >/dev/null 2>/dev/null
|
||||
fi
|
||||
|
||||
# Check if DSM zImage changed, patch it if necessary
|
||||
ZIMAGE_HASH="$(readConfigKey "zimage-hash" "${USER_CONFIG_FILE}")"
|
||||
|
@ -75,6 +75,7 @@ ETHX=($(ls /sys/class/net/ | grep eth)) # real network cards list
|
||||
if [ ! -f "${USER_CONFIG_FILE}" ]; then
|
||||
touch "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "lkm" "prod" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "dsmlogo" "true" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "directboot" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "notsetmacs" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "bootipwait" "10" "${USER_CONFIG_FILE}"
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -27,6 +27,7 @@ SMALLNUM="$(readConfigKey "smallnum" "${USER_CONFIG_FILE}")"
|
||||
LAYOUT="$(readConfigKey "layout" "${USER_CONFIG_FILE}")"
|
||||
KEYMAP="$(readConfigKey "keymap" "${USER_CONFIG_FILE}")"
|
||||
LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
|
||||
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
||||
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
|
||||
NOTSETMACS="$(readConfigKey "notsetmacs" "${USER_CONFIG_FILE}")"
|
||||
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
|
||||
@ -294,7 +295,7 @@ function addonMenu() {
|
||||
ADDON="$(<"${TMP_PATH}/resp")"
|
||||
[ -z "${ADDON}" ] && continue
|
||||
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \
|
||||
--inputbox "$(TEXT "Type a opcional params to addon")" 0 0 \
|
||||
--inputbox "$(TEXT "Type a optional params to addon")" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
VALUE="$(<"${TMP_PATH}/resp")"
|
||||
@ -1018,6 +1019,7 @@ function advancedMenu() {
|
||||
echo "r \"$(TEXT "Restore bootloader disk # test")\"" >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
echo "o \"$(TEXT "Install development tools")\"" >>"${TMP_PATH}/menu"
|
||||
echo "g \"$(TEXT "Show dsm logo:") \Z4${DSMLOGO}\Zn\"" >>"${TMP_PATH}/menu"
|
||||
echo "e \"$(TEXT "Exit")\"" >>"${TMP_PATH}/menu"
|
||||
|
||||
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
|
||||
@ -1393,6 +1395,11 @@ function advancedMenu() {
|
||||
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
|
||||
--msgbox "$(TEXT "opkg install is complete. Please reconnect to SSH/web, or execute 'source ~/.bashrc'")" 0 0
|
||||
;;
|
||||
g)
|
||||
[ "${DSMLOGO}" = "true" ] && DSMLOGO='false' || DSMLOGO='true'
|
||||
writeConfigKey "dsmlogo" "${DSMLOGO}" "${USER_CONFIG_FILE}"
|
||||
NEXT="e"
|
||||
;;
|
||||
e) break ;;
|
||||
esac
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user