developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 1 | require ccsp_common_turris.inc |
| 2 | |
| 3 | export PLATFORM_TURRIS_ENABLED="yes" |
| 4 | |
| 5 | inherit systemd |
| 6 | |
| 7 | DEPENDS_remove_dunfell = "hal-gwprovappabs" |
| 8 | DEPENDS_append_dunfell = " breakpad-wrapper rdk-logger utopia" |
| 9 | |
| 10 | LDFLAGS_remove_dunfell = "-lgwprovappabs" |
| 11 | |
| 12 | CFLAGS_append = " -Wno-unused-variable -Wno-sizeof-pointer-memaccess -Wno-unused-parameter -Wno-unused-but-set-variable " |
| 13 | |
| 14 | do_install_append () { |
| 15 | install -d ${D}${systemd_unitdir}/system |
| 16 | install -m 0644 ${S}/service/gwprovethwan.service ${D}${systemd_unitdir}/system |
| 17 | sed -i "s/After=rg_network.service/After=network.target/g" ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 18 | sed -i "/After=network.target/a wants=network.target" ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 19 | sed -e '/Type/ s/^#*/#/' -i ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 20 | sed -e '/ExecStartPre/ s/^#*/#/' -i ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 21 | sed -i "/utopia_init.sh/a ExecStartPre=-/bin/sh -c 'mkdir -p /rdklogs/logs/'" ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 22 | sed -e '/ExecStartPost/ s/^#*/#/' -i ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 23 | sed -i "/bin\/rm/a Restart=always" ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 24 | sed -i "s/StandardOutput=syslog/StandardOutput=syslog+console/g" ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 25 | sed -i "s/wants=/Wants=/" ${D}${systemd_unitdir}/system/gwprovethwan.service |
| 26 | } |
| 27 | |
| 28 | SYSTEMD_SERVICE_${PN} = "gwprovethwan.service" |
| 29 | FILES_${PN} += " \ |
| 30 | ${systemd_unitdir}/system/gwprovethwan.service \ |
| 31 | " |