mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
add "Switch way of switching kernel"
This commit is contained in:
parent
08d7279313
commit
c2ce4ed497
@ -230,6 +230,6 @@ echo -e "\033[1;37m$(TEXT "Booting...")\033[0m"
|
||||
for T in $(w | grep -v "TTY" | awk -F' ' '{print $2}'); do
|
||||
echo -e "\n\033[1;43m$(TEXT "[This interface will not be operational. Please use the http://find.synology.com/ find DSM and connect.]")\033[0m\n" >"/dev/${T}" 2>/dev/null || true
|
||||
done
|
||||
#poweroff
|
||||
kexec -f -e
|
||||
KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")"
|
||||
[ "${KERNELWAY}" = "kexec" ] && kexec -f -e || poweroff
|
||||
exit 0
|
||||
|
@ -78,6 +78,7 @@ if [ ! -f "${USER_CONFIG_FILE}" ]; then
|
||||
writeConfigKey "directboot" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "notsetmacs" "false" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "bootipwait" "10" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "kernelway" "power" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "model" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "productver" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "buildnum" "" "${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
@ -30,6 +30,7 @@ LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
|
||||
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
|
||||
NOTSETMACS="$(readConfigKey "notsetmacs" "${USER_CONFIG_FILE}")"
|
||||
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
|
||||
KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")"
|
||||
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
|
||||
|
||||
###############################################################################
|
||||
@ -973,6 +974,7 @@ function advancedMenu() {
|
||||
echo "q \"$(TEXT "Switch direct boot:") \Z4${DIRECTBOOT}\Zn\"" >>"${TMP_PATH}/menu"
|
||||
if [ "${DIRECTBOOT}" = "false" ]; then
|
||||
echo "w \"$(TEXT "boot IPs wait time:") \Z4${BOOTIPWAIT}\Zn\"" >>"${TMP_PATH}/menu"
|
||||
echo "k \"$(TEXT "Switch way of switching kernel:") \Z4${KERNELWAY}\Zn\"" >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
fi
|
||||
echo "m \"$(TEXT "Switch 'not set MACs':") \Z4${NOTSETMACS}\Zn\"" >>"${TMP_PATH}/menu"
|
||||
@ -980,7 +982,7 @@ function advancedMenu() {
|
||||
echo "t \"$(TEXT "Try to recovery a DSM installed system")\"" >>"${TMP_PATH}/menu"
|
||||
echo "s \"$(TEXT "Show SATA(s) # ports and drives")\"" >>"${TMP_PATH}/menu"
|
||||
if [ -n "${MODEL}" -a -n "${PRODUCTVER}" ]; then
|
||||
echo "k \"$(TEXT "show/modify the current pat data")\"" >>"${TMP_PATH}/menu"
|
||||
echo "c \"$(TEXT "show/modify the current pat data")\"" >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
echo "a \"$(TEXT "Allow downgrade installation")\"" >>"${TMP_PATH}/menu"
|
||||
echo "f \"$(TEXT "Format disk(s) # Without loader disk")\"" >>"${TMP_PATH}/menu"
|
||||
@ -1024,6 +1026,11 @@ function advancedMenu() {
|
||||
writeConfigKey "bootipwait" "${BOOTIPWAIT}" "${USER_CONFIG_FILE}"
|
||||
NEXT="e"
|
||||
;;
|
||||
k)
|
||||
[ "${KERNELWAY}" = "kexec" ] && KERNELWAY='power' || KERNELWAY='kexec'
|
||||
writeConfigKey "kernelway" "${KERNELWAY}" "${USER_CONFIG_FILE}"
|
||||
NEXT="e"
|
||||
;;
|
||||
m)
|
||||
[ "${NOTSETMACS}" = "false" ] && NOTSETMACS='true' || NOTSETMACS='false'
|
||||
writeConfigKey "notsetmacs" "${NOTSETMACS}" "${USER_CONFIG_FILE}"
|
||||
@ -1077,7 +1084,7 @@ function advancedMenu() {
|
||||
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \
|
||||
--msgbox "${MSG}" 0 0
|
||||
;;
|
||||
k)
|
||||
c)
|
||||
PATURL="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")"
|
||||
PATSUM="$(readConfigKey "patsum" "${USER_CONFIG_FILE}")"
|
||||
MSG="$(TEXT "pat: (editable)")"
|
||||
|
@ -12,8 +12,6 @@ cmdline: &cmdline
|
||||
synoboot2:
|
||||
SMBusHddDynamicPower: 1
|
||||
vender_format_version: 2
|
||||
syno_ttyS0: "serial,0x3f8"
|
||||
syno_ttyS1: "serial,0x2f8"
|
||||
elevator: elevator
|
||||
platform: "grantley"
|
||||
unique: "synology_grantley_fs3017"
|
||||
@ -22,8 +20,8 @@ serial:
|
||||
- "0000"
|
||||
middle: "XXX"
|
||||
suffix: "numeric"
|
||||
dom: 2
|
||||
dt: true
|
||||
dom: 1
|
||||
dt: false
|
||||
disks: 24
|
||||
beta: true
|
||||
productvers:
|
||||
|
Loading…
x
Reference in New Issue
Block a user