developer | cc441a0 | 2022-05-09 19:04:26 +0800 | [diff] [blame] | 1 | require ccsp_common_filogic.inc |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 2 | |
| 3 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 4 | |
| 5 | EXTRA_OECONF += "PHP_RPATH=no" |
| 6 | |
| 7 | SRC_URI += "${CMF_GIT_ROOT}/rdkb/devices/raspberrypi/sysint;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/devices;name=webuijst" |
| 8 | SRCREV_webuijst = "${AUTOREV}" |
| 9 | |
| 10 | SRC_URI_append = " \ |
| 11 | file://CcspWebUI.sh \ |
| 12 | file://CcspWebUI.service \ |
| 13 | " |
| 14 | inherit systemd |
| 15 | do_install_append () { |
| 16 | install -d ${D}${sysconfdir} |
| 17 | install -d ${D}${base_libdir}/rdk/ |
| 18 | install -d ${D}${systemd_unitdir}/system/ |
| 19 | |
developer | cc441a0 | 2022-05-09 19:04:26 +0800 | [diff] [blame] | 20 | # delete wan0 reference for Filogic |
| 21 | sed -i "/wan0:80/a echo \"This interface is not available in Filogic\"" ${D}${sysconfdir}/webgui.sh |
| 22 | sed -i "/wan0:443/a echo \"This interface is not available in Filogic\"" ${D}${sysconfdir}/webgui.sh |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 23 | sed -i "s/if \[ \"\$BOX_TYPE\" == \"HUB4\" \]/if \[ \"\$BOX_TYPE\" = \"HUB4\" \]/g" ${D}${sysconfdir}/webgui.sh |
| 24 | sed -i '/wan0/d' ${D}${sysconfdir}/webgui.sh |
| 25 | |
developer | cc441a0 | 2022-05-09 19:04:26 +0800 | [diff] [blame] | 26 | #delete server.pem reference for Filogic |
| 27 | sed -e '/server.pem/ s/^#*/echo "Removed server.pem references for Filogic"\n#/' -i ${D}${sysconfdir}/webgui.sh |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 28 | |
| 29 | install -m 755 ${WORKDIR}/CcspWebUI.sh ${D}${base_libdir}/rdk/ |
| 30 | install -m 644 ${WORKDIR}/CcspWebUI.service ${D}${systemd_unitdir}/system/ |
| 31 | |
| 32 | sed -i '/Security.X_COMCAST-COM_KeyPassphrase/a \ |
| 33 | \t\t\tsetStr("Device.DeviceInfo.X_RDKCENTRAL-COM_ConfigureWiFi", "false", true);' ${D}/usr/www2/actionHandler/ajaxSet_wireless_network_configuration_redirection.jst |
| 34 | sed -i "s/\$clients_RSSI\[strtoupper(\$Host\[\$i\.toString\(\)\]\['PhysAddress'\])\]/\$Host\[\$i\.toString\(\)\]\['X_CISCO_COM_RSSI'\]/g" ${D}/usr/www2/connected_devices_computers.jst |
| 35 | sed -i "s/\$wnStatus= (\$wan_enable==\"true\" \&\& \$wan_status==\"Down\") ? \"true\" : \"false\";/\$wnStatus= (\$wan_enable==\"true\" \&\& \$wan_status==\"Up\") ? \"true\" : \"false\";/g" ${D}/usr/www2/wan_network.jst |
| 36 | sed -i "s/if((!strcmp(\$url, \$Wan_IPv4) || ((inet_pton(\$url)!=\"\") || (inet_pton(\$Wan_IPv6!==\"\"))) \&\&(inet_pton(\$url) == inet_pton(\$Wan_IPv6)))){/if((!strcmp(\$url, \$Wan_IPv4) || ((inet_pton(\$url)!=\"\") \&\& (inet_pton(\$Wan_IPv6!==\"\"))) \&\&(inet_pton(\$url) == inet_pton(\$Wan_IPv6)))){/g" ${D}/usr/www2/index.jst |
| 37 | sed -i "s/\$Wan_IPv4 = getStr(\"Device.X_CISCO_COM_CableModem.IPAddress\");/\$Wan_IPv4 = getStr(\"Device.DeviceInfo.X_COMCAST-COM_CM_IP\");/g" ${D}/usr/www2/captiveportal.jst |
| 38 | sed -i "s/if((!strcmp(\$url, \$Wan_IPv4) || ((inet_pton(\$url)!=\"\") || (inet_pton(\$Wan_IPv6!==\"\"))) \&\&(inet_pton(\$url) == inet_pton(\$Wan_IPv6)))){/if((!strcmp(\$url, \$Wan_IPv4) || ((inet_pton(\$url)!=\"\") \&\& (inet_pton(\$Wan_IPv6!==\"\"))) \&\&(inet_pton(\$url) == inet_pton(\$Wan_IPv6)))){/g" ${D}/usr/www2/captiveportal.jst |
| 39 | sed -i '/\/\/ setStr("Device.WiFi.Radio."+\$r+".X_CISCO_COM_ApplySetting", "true", true);/ s/\/\///' ${D}/usr/www2/actionHandler/ajaxSet_wireless_network_configuration_edit.jst |
| 40 | sed -i "s/\/usr\/www/\/usr\/www2/g" ${D}${systemd_unitdir}/system/CcspWebUI.service |
| 41 | } |
| 42 | |
| 43 | SYSTEMD_SERVICE_${PN} += "CcspWebUI.service" |
| 44 | FILES_${PN} += "${systemd_unitdir}/system/CcspWebUI.service ${base_libdir}/rdk/*" |