forked from sbwml/r4s_build_script
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sbwml:master' into master
- Loading branch information
Showing
16 changed files
with
129 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
#!/bin/sh | ||
|
||
device=`basename $DEVPATH` | ||
point=$device | ||
|
||
case $device in | ||
mtdblock*|ubiblock*|zram*) | ||
exit 0 | ||
;; | ||
esac | ||
|
||
case "$ACTION" in | ||
add) | ||
mkdir -p /usb/$point | ||
mount -o rw,noatime,discard /dev/$device /usb/$point | ||
if [ -f "/usb/$point/recovery.txt" ]; then | ||
mkdir -p /usb/$device | ||
mount -o rw,noatime,discard /dev/$device /usb/$device | ||
if [ -f "/usb/$device/recovery.txt" ]; then | ||
echo y | firstboot | ||
sleep 2 | ||
reboot | ||
else | ||
umount -l /usb/$point | ||
umount -l /usb/$device | ||
rm -rf /usb | ||
fi | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
openwrt/patch/luci/0001-luci-mod-system-add-modal-overlay-dialog-to-reboot.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From 0c1f0e62e72e4c89b0db25aa6f6baa19c7e91e75 Mon Sep 17 00:00:00 2001 | ||
From: sbwml <admin@cooluc.com> | ||
Date: Fri, 13 Sep 2024 19:36:44 +0800 | ||
Subject: [PATCH 1/5] luci-mod-system: add modal overlay dialog to reboot | ||
|
||
Signed-off-by: sbwml <admin@cooluc.com> | ||
--- | ||
.../resources/view/system/reboot.js | 21 ++++++++++++++++++- | ||
1 file changed, 20 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js | ||
index 92e1dd4..c106f78 100644 | ||
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js | ||
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js | ||
@@ -30,7 +30,26 @@ return view.extend({ | ||
body.appendChild(E('hr')); | ||
body.appendChild(E('button', { | ||
'class': 'cbi-button cbi-button-action important', | ||
- 'click': ui.createHandlerFn(this, 'handleReboot') | ||
+ 'click': function () { | ||
+ ui.showModal(_('Confirm Reboot'), [ | ||
+ E('p', {}, _('Are you sure you want to reboot the system?')), | ||
+ E('button', { | ||
+ 'class': 'cbi-button cbi-button-action important', | ||
+ 'style': 'margin-left: 0px; background: red!important; border-color: red!important', | ||
+ 'click': function () { | ||
+ ui.hideModal(); | ||
+ this.handleReboot(); | ||
+ }.bind(this) | ||
+ }, _('Confirm')), | ||
+ E('button', { | ||
+ 'class': 'btn cbi-button cbi-button-apply', | ||
+ 'style': 'margin-left: 20px', | ||
+ 'click': function () { | ||
+ ui.hideModal(); | ||
+ } | ||
+ }, _('Cancel')) | ||
+ ]); | ||
+ }.bind(this) | ||
}, _('Perform reboot'))); | ||
|
||
return body; | ||
-- | ||
2.42.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
LINUX_VERSION-6.6 = .50 | ||
LINUX_KERNEL_HASH-6.6.50 = c065e36daf28210060c91a37ef3e92ac5814784e634577e04e406297ead2e86e | ||
LINUX_VERSION-6.6 = .51 | ||
LINUX_KERNEL_HASH-6.6.51 = 1c0c9a14650879c4913efdbac428ba31a540c3d987155ddf34d33e11eca008b3 |