Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "selftest chown" |
| 2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
| 3 | |
| 4 | LICENSE = "MIT" |
| 5 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 6 | DEPENDS += "coreutils-native" |
| 7 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | S = "${WORKDIR}" |
| 9 | |
| 10 | inherit useradd allarch |
| 11 | |
| 12 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 13 | USERADD_PARAM:${PN} = "-u 1234 -M test" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | TESTDIR = "${D}${sysconfdir}/selftest-chown" |
| 15 | |
| 16 | do_install() { |
| 17 | install -d ${TESTDIR} |
| 18 | install -d ${TESTDIR}/dir |
| 19 | touch ${TESTDIR}/file |
| 20 | ln -s ./file ${TESTDIR}/symlink |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 21 | install -d ${TESTDIR}/fifotest |
| 22 | mkfifo ${TESTDIR}/fifotest/fifo |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | |
| 24 | chown test:test ${TESTDIR}/file |
| 25 | chown -R test:test ${TESTDIR}/dir |
| 26 | chown -h test:test ${TESTDIR}/symlink |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 27 | chown -R test:test ${TESTDIR}/fifotest |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | } |
| 29 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 30 | FILES:${PN} = "${sysconfdir}/selftest-chown/*" |