1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-12 11:21:55 +00:00

Fix syslog display in web interface

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-06-30 12:49:02 +02:00
parent 9afbf76bda
commit d6c32be3a4
2 changed files with 33 additions and 8 deletions

View file

@ -159,20 +159,20 @@ echo "rm -rf $OMR_TARGET/${OMR_KERNEL}/source/package/boot/uboot-rockchip"
rm -rf "${OMR_TARGET}/${OMR_KERNEL}/source/package/boot/uboot-rockchip"
[ "${OMR_KERNEL}" = "5.4" ] && rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/tools/firmware-utils"
if [ "$OMR_TARGET" != "rutx" ]; then
if [ "$OMR_TARGET" = "rutx" ] && [ "${OMR_KERNEL}" = "5.4" ]; then
# cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source"
cp -rf common/* "$OMR_TARGET/${OMR_KERNEL}/source/"
cp -rf ${OMR_KERNEL}/* "$OMR_TARGET/${OMR_KERNEL}/source/"
else
# There is many customization to support rutx and this seems to break other ipq40xx, so dirty workaround for now
[ -d "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" ] && mv -f "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old"
# [ -d "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" ] && mv -f "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old"
# cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source"
echo "cp -rf common/* $OMR_TARGET/${OMR_KERNEL}/source"
cp -rf common/* "$OMR_TARGET/${OMR_KERNEL}/source"
echo "cp -rf ${OMR_KERNEL}/* $OMR_TARGET/${OMR_KERNEL}/source"
cp -rf ${OMR_KERNEL}/* "$OMR_TARGET/${OMR_KERNEL}/source"
rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx"
mv -f "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx"
else
# cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source"
cp -rf common/* "$OMR_TARGET/${OMR_KERNEL}/source/"
cp -rf ${OMR_KERNEL}/* "$OMR_TARGET/${OMR_KERNEL}/source/"
# rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx"
# mv -f "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx"
fi
cat >> "$OMR_TARGET/${OMR_KERNEL}/source/package/base-files/files/etc/banner" <<EOF
@ -734,6 +734,9 @@ if ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-occitan.patch; then
patch -N -p1 -s < ../../patches/luci-occitan.patch
#sh feeds/luci/build/i18n-add-language.sh oc
fi
if ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-syslog.patch; then
patch -N -p1 -s < ../../patches/luci-syslog.patch
fi
cd ../..
[ -d $OMR_FEED/luci-base/po/oc ] && cp -rf $OMR_FEED/luci-base/po/oc feeds/${OMR_KERNEL}/luci/modules/luci-base/po/
echo "Done"

22
patches/luci-syslog.patch Normal file
View file

@ -0,0 +1,22 @@
--- a/luci/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js 2023-06-29 19:59:37.617291312 +0200
+++ b/luci/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js 2023-06-29 19:59:52.497047710 +0200
@@ -11,7 +11,7 @@
]).then(function(stat) {
var logger = stat[0] ? stat[0].path : stat[1] ? stat[1].path : null;
- return fs.exec_direct(logger, [ '-e', '^' ]).catch(function(err) {
+ return fs.exec_direct(logger).catch(function(err) {
ui.addNotification(null, E('p', {}, _('Unable to load log data: ' + err.message)));
return '';
});
--- a/luci/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 2023-06-29 20:01:01.203922762 +0200
+++ b/luci/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 2023-06-29 20:01:05.479852745 +0200
@@ -33,7 +33,7 @@
"file": {
"/bin/dmesg -r": [ "exec" ],
"/sbin/logread": [ "stat" ],
- "/sbin/logread -e ^": [ "exec" ],
+ "/sbin/logread": [ "exec" ],
"/usr/sbin/logread": [ "stat" ],
"/usr/sbin/logread -e ^": [ "exec" ]
},