Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-utilities / platform-util.bb
1 DESCRIPTION  = "platform-util"
2 SUMMARY  = "StarlingX Platform utilities installed only on controllers"
3
4 require utilities-common.inc
5
6 SUBPATH0 = "utilities/platform-util/platform-util"
7
8 LICENSE = "Apache-2.0"
9 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
10
11 RDEPENDS_${PN}_append  = " bash"
12
13 inherit setuptools systemd
14 DISTRO_FEATURES_BACKFILL_CONSIDERED_remove = "sysvinit"
15 SYSTEMD_PACKAGES += " ${PN}"
16 SYSTEMD_SERVICE_${PN} = "opt-platform.service"
17 SYSTEMD_AUTO_ENABLE_${PN} = "disable"
18
19 do_unpack_append() {
20     bb.build.exec_func('do_restore_files', d)
21 }
22
23 do_restore_files() {
24         cd ${S}
25         git reset ${SRCREV} utilities/platform-util/scripts
26         git checkout utilities/platform-util/scripts
27 }
28
29 do_install_append() {
30
31         cd ${S}/utilities/platform-util/scripts
32
33         install -d -m0755 ${D}/${bindir}
34         install -m0755 tc_setup.sh ${D}/${bindir}/tc_setup.sh
35         install -m0755 remotelogging_tc_setup.sh ${D}/${bindir}/remotelogging_tc_setup.sh
36         install -m0755 connectivity_test  ${D}/${bindir}/connectivity_test
37         install -m0755 update-iso.sh ${D}/${bindir}/update-iso.sh
38
39         install -p -d -m0755 ${D}/${sysconfdir}/init.d
40         install -m0755 log_functions.sh ${D}/${sysconfdir}/init.d/log_functions.sh
41
42         install -p -d -m0755 ${D}/${sbindir}
43         install -m0755 patch-restart-mtce  ${D}/${sbindir}/patch-restart-mtce
44         install -m0755 patch-restart-processes ${D}/${sbindir}/patch-restart-processes
45         install -m0755 patch-restart-haproxy ${D}/${sbindir}/patch-restart-haproxy
46
47
48
49         install -p -d -m0755 ${D}/${systemd_system_unitdir}
50
51         install -m0644 opt-platform.mount  ${D}/${systemd_system_unitdir}/opt-platform.mount
52         install -m0644 opt-platform.service ${D}/${systemd_system_unitdir}/opt-platform.service
53
54 }
55
56 FILES_${PN}_append  = " ${systemd_system_unitdir}/opt-platform.mount"