Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-connectivity / nfs-utils / nfs-utils_%.bbappend
1 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3 inherit stx-metadata
4
5 STX_REPO = "config-files"
6 STX_SUBPATH0 = "filesystem-scripts"
7 STX_SUBPATH1 = "nfs-utils-config"
8
9 LICENSE_append = "& Apache-2.0"
10 LIC_FILES_CHKSUM += "\
11         file://${STX_METADATA_PATH}/${STX_SUBPATH0}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
12         file://${STX_METADATA_PATH}/${STX_SUBPATH0}/filesystem-scripts-1.0/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
13         file://${STX_METADATA_PATH}/${STX_SUBPATH1}/centos/nfs-utils-config.spec;beginline=1;endline=10;md5=bbfb66ff81fec36fc2b2c9d98e01b1d8 \
14         "
15
16 inherit systemd
17
18 PACKAGES =+ "${PN}-config"
19 SYSTEMD_PACKAGES += "${PN}-config"
20 SYSTEMD_SERVICE_${PN}-config = "uexportfs.service nfscommon.service nfsserver.service"
21 SYSTEMD_AUTO_ENABLE_${PN} = "disable"
22 SYSTEMD_AUTO_ENABLE_${PN}-config = "enable"
23
24 DISTRO_FEATURES_BACKFILL_CONSIDERED_remove = "sysvinit"
25
26 do_install_append() {
27         mv ${D}/${sbindir}/sm-notify ${D}/${sbindir}/nfs-utils-client_sm-notify
28         install -D -m 755 ${STX_METADATA_PATH}/${STX_SUBPATH0}/filesystem-scripts-1.0/uexportfs ${D}/${sysconfdir}/init.d/uexportfs
29
30         # install nfs.conf and enable udp proto
31         install -m 0755 ${S}/nfs.conf ${D}${sysconfdir}
32         sed -i -e 's/#\(\[nfsd\]\)/\1/' -e 's/#\( udp=\).*/\1y/' ${D}${sysconfdir}/nfs.conf
33
34         # add initial exports file
35         echo "# Initial exports for nfs" > ${D}${sysconfdir}/exports
36
37         # Libdir here is hardcoded in other scripts.
38         install -d -m 0755 ${D}/usr/lib/ocf/resource.d/platform/
39         install -D -m 755 ${STX_METADATA_PATH}/${STX_SUBPATH0}/filesystem-scripts-1.0/nfsserver-mgmt \
40                 ${D}/usr/lib/ocf/resource.d/platform/nfsserver-mgmt
41         
42         install -p -D -m 755 ${STX_METADATA_PATH}/${STX_SUBPATH0}/filesystem-scripts-1.0/nfs-mount ${D}/${bindir}/nfs-mount
43         install -D -m 755 ${STX_METADATA_PATH}/${STX_SUBPATH0}/filesystem-scripts-1.0/uexportfs.service \
44                         ${D}/${systemd_system_unitdir}/uexportfs.service
45
46
47         install -d ${D}/${sysconfdir}/init.d
48         install -d ${D}/${systemd_system_unitdir}
49
50         install -m 755 -p -D ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/nfscommon        ${D}/${sysconfdir}/init.d
51         install -m 644 -p -D ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/nfscommon.service        ${D}/${systemd_system_unitdir}/
52
53         install -m 755 -p -D ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/nfsserver            ${D}/${sysconfdir}/init.d
54         install -m 644 -p -D ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/nfsserver.service    ${D}/${systemd_system_unitdir}
55         install -m 644 -p -D ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/nfsmount.conf        ${D}/${sysconfdir}/nfsmount.conf
56
57 }
58
59 FILES_${PN}-config = "\
60         ${systemd_system_unitdir}/nfscommon.service \
61         ${systemd_system_unitdir}/nfsserver.service \
62         ${systemd_system_unitdir}/uexportfs.service \
63         ${sysconfdir}/nfsmount.conf \
64         "
65 FILES_${PN}_append = " usr/lib/ocf/resource.d"